Fix parsing Bitbucket commits without a matching user account.

Review Request #8818 - Created March 16, 2017 and submitted

Christian Hammond
Review Board
release-2.5.x
c966d17...
reviewboard
The new Bitbucket API 2.0 change made an assumption that there's always
a Bitbucket user account associated with a commit, but this isn't always
going to be true. This assumption led to a KeyError when trying to fetch
some data from the payload. Instead of working with the user account, we
now use the "raw" author information, which is the information that will
be seen in the repository. This is probably more correct, and is safer.

Unit tests pass.

Verified that the commit that broke in production has the "raw" field.

Tested against commits on a couple repositories.

Review Bot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/hostingsvcs/tests/test_bitbucket.py
        reviewboard/hostingsvcs/bitbucket.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/hostingsvcs/tests/test_bitbucket.py
        reviewboard/hostingsvcs/bitbucket.py
    
    
  2. 
      
Christian Hammond
Review Bot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/hostingsvcs/tests/test_bitbucket.py
        reviewboard/hostingsvcs/bitbucket.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/hostingsvcs/tests/test_bitbucket.py
        reviewboard/hostingsvcs/bitbucket.py
    
    
  2. 
      
Barret Rennie
  1. Ship It!
  2. 
      
Christian Hammond
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.5.x (07a401b)
Loading...