User Story Pull Requests
Copado lets you create a Pull Request from a User Story and seamlessly add Code Review as part of your Copado quality gates.
- Create an API Key in order for Github to notify the pull request events to Copado (via the Copado Webhook API).
- Make sure the Branch Base URL and Commit Base URL are setup on the Git Repository record in Copado. You can review the Git Repository documentation here.
- (Optional) Review the Webhook API documentation here and click on the "Post" link to see the Pull Request Webhook URL details.
Setting up the Pull Request Webhook
Open your Git Repository and click on the Settings tab (if you do not see the Settings, please comm touch with your admin). Then click on the "Webhooks" menu item and then click on the "Add Webhook" button.
Fill the following information on the webhook configuration page:
- Payload URL: The Pull Request Webhook URL with the base URL of the Org where Copado is installed and your API Key.
- e.g. https://copado.herokuapp.com/json/v1/webhook/pullRequest?api_key=XXXXX
- Content Type: Select "application/json"
- Secret: Leave it empty
- Which events would you like to trigger this webhook?: Click on the "Let me select individual events" checkbox.
Then select the Pull request, Pull request review and Issue comment events (leave all other deselected).
Leave the Active checkbox selected and then click "Add webhook".
Once the Webhook is configured in Github, the pull requests made from a User Story feature branch will be received by Copado and displayed on the User Story detail page.
Copado also tracks Code Reviews of the pull request and you can review them in the pull request detail page in Copado.
After a successful promotion and deployment of the User Story to the target environment, the pull request will automatically change its state from "open" to "closed" with the merged flag checked.
As of v11, once a pull request is created, the user story will be automatically updated with the mergeable status of the pull request when it is available.
Pull Requests Providers
Copado not only supports pull requests from your user stories for Github but also for Bitbucket (Server and Cloud), Stash, GitLab, VSTS and any on-premise git provider, so that, your development process can include this quality gate as part of it no matter what Git vendor you use.
More information about all these providers here.