code-corps-api
code-corps-api copied to clipboard
Sync assignees to GitHub
Problem
When a task is assigned a user on Code Corps, we need to be able to sync that assignee to GitHub.
When assigning:
- In the
UserTaskControllercreateorupdate - Check if the task has a github_issue
- Check the assignee can be assigned using
GET /repos/:owner/:repo/assignees/:assignee-
204response if yes -
404response if no
-
- then
POST /repos/:owner/:repo/issues/:number/assigneeswith a key of"assignees"and value of an array of GitHub usernames
When unassigning:
- In the
UserTaskControllerupdateordelete - Check if the task has a github_issue
- Check the assignee can be assigned using
GET /repos/:owner/:repo/assignees/:assignee-
204response if yes -
404response if no
-
-
DELETE /repos/:owner/:repo/issues/:number/assigneeswith a key of"assignees"and value of an array of GitHub usernames