• 
      

    Multi-commit Pull Request Diff Support

    Review Request #8547 — Created Nov. 19, 2016 and updated — Latest diff uploaded

    Information

    Review Board
    dvcs
    cc31765...

    Reviewers

    Reviewboard 4 introduces the concept of a DiffCommit, where a list of them can be used to represent a series of commits. This is especially helpful for pull requests, as they are often created and updated with multiple commits at a time.

    All the commits in the pull request when the review request is created will be added to a revision. Further updates to the pull request will cause all the commits (not just the commits since then) to be added to the next revision, and so on.

    This integrates DiffCommit with the current pull request implementation; the aim is to support pull requests created with multiple commits.

    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
    - Verified that pull requests with multiple commits get put into a single DiffSet and get rendered together.