In COR we have the possibility to integrate our Github account and associate our PRs to existing tasks.
Activation
The first thing we have to do, is to go to the repository where we have the pull request we want to associate to our task. There, we have to go to Settings → Webhooks → Add webhooks:
Note: This must be done in all the repositories that we want to associate.
Then, we must complete:
- Payload URL with the url of the api: https://api.projectcor.com/v1/git
- Content type with: application/json
- Secret: with any word to sign the integration.
When we add that Secret, it is necessary that we send it to help@projectcor.com so that from COR it is assigned in our account. |
In "Which events would you like to trigger this webhook?", we must select "Send me everything" so that we can correctly integrate our tasks. To finish, we must click on "Add Webhook":
GitHub documentation on webhooks: Creating webhooks
Connection
In order to connect a pull request with a task, it is necessary to add to the name that the pull request has in GitHub, the word COR + a hyphen (-) + the ID of the corresponding COR task at the beginning. It is important that if we add a description to the PR, we leave a blank space between the task ID and the description.
Name of the pull request: COR-{task_id} Description
Multiple PRs can be associated to a task, but only one COR task can be associated to a pull request.
To change the association of a PR from one task to another, we can simply overwrite the task ID in the PR name on Github.
To disassociate a PR from a task, we just need to remove the task ID from the pull request name on GitHub.
Functionality
Once the integration is activated and a Pull Request is associated to a COR task, the GitHub icon will automatically appear in the outer left margin of the task panel.
Clicking on the GitHub icon will display a modal containing essential information:
- Linked repository
- Linked Pull request
- Pull request status
- Release (corresponding branch)
- The user Author icon (from GitHub) with a tooltip with their username.
The statuses displayed in COR are:
- PULL_REQUEST: Awaiting PR approval.
- MERGED: Approved.
Clicking on the Repository name in this modal redirects us to the Pull request repository on GitHub.
Clicking on the Pull request name in this modal, redirects us to the code corresponding to that Pull Request.