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.
- Pull Request Webhook URL: you can review the Webhook API documentation here and click on the "Pull Request Event" link to see the Pull Request Webhook URL.
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.