Status integration for pull requests

Review Request #8463 — Created Oct. 16, 2016 and discarded — Latest diff uploaded

Information

Review Board
dvcs

Reviewers

Adds support for setting statuses on pull requests.

When a new pull request is created, and that repository is linked to a RB webhook, a new corresponding review request will be created. That will automatically set the pending status for the pull request.

Whenever an issue is open on the review request, the status is set to "error".
When the review request is "approved" (defaulting to 1+ ship it's and no open issues), the status is set to "success".
Otherwise, the PR has a "pending" status.

  • Added unit tests
    • to verify the pull request hook is called, and only works with pull_request events and the right signature
    • to verify pull requests are created and updated when a pull request is created
    • to verify the pull request's status starts off with 'pending', is 'error' when there's open issues, and 'success' when approved

  • Manual testing
    • Created a pull request on a repository linked to ReviewBoard through webhooks
    • Verified the review request was created with 'pending' status
    • Verified that opening an issue on the review request sets the 'error' status on the pull request
    • Verified that having no open issue and adding a 'Ship it!' sets the 'success' status on the pull request
    Loading...