Fix fetching commits by branch on GitHub.

Review Request #6575 — Created Nov. 12, 2014 and submitted

Information

Review Board
release-2.0.x
4b95f47...

Reviewers

When I fixed filtering of SVN commits by branch, several versions
ago, I broke filtering by branch on GitHub.

The New Review Request page was no longer passing the starting SHA,
which GitHub needed, resulting in all commits being returned. This call
has been fixed.

It's worth noting that the GitHub API allows for filtering by branch,
but you can't both use that and SHAs for pagination. The SHA is good
enough, if provided, so we'll continue to use that, falling back on a
branch if only a branch is provided. The code has been updated with
documentation to cover this.

Tested looking at commits by branch on GitHub. Properly saw different
commits on different branches.

Unit tests pass.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/static/rb/js/newReviewRequest/views/postCommitView.js
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/static/rb/js/newReviewRequest/views/postCommitView.js
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (7ace4a6)
Loading...