Fix parsing Bitbucket commits without a matching user account.

Review Request #505 - Created March 24, 2017 and updated

guest5620
Review Board
07a401b...
demo
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.

Testing Done:
Unit tests pass.

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

Tested against commits on a couple repositories.

Reviewed at https://reviews.reviewboard.org/r/8818/


  • 2
  • 0
  • 4
  • 1
  • 7
Description From Last Updated
Markdown Improve commenting Improve variable names. guest3901 guest3901
Gulp guest3901 guest3901
guest9810
  1. Ship It!
  2. 
      
guest513
  1. what does this do

  2. reviewboard/hostingsvcs/bitbucket.py (Diff revision 1)
     
     

    what the heck

  3. 
      
guest513
  1. Ship It!
  2. 
      
guest14
  1. Inviala!
  2. 
      
guest2246
guest2246
  1. 
      
  2. reviewboard/hostingsvcs/bitbucket.py (Diff revision 1)
     
     

    test issue

  3. 
      
guest3901
  1. 
      
  2. reviewboard/hostingsvcs/bitbucket.py (Diff revision 1)
     
     

    Markdown

    1. Improve commenting
    2. Improve variable names.
  3. 
      
guest3901
  1. 
      
  2. reviewboard/hostingsvcs/bitbucket.py (Diff revision 1)
     
     

    This seems to be a problem.

  3. 
      
guest3901
  1. 
      
  2. Hello

    1. ddd
    2. ddd
  3. 
      
guest3901
  1. 
      
  2. my comment

  3. Default value is incorrect.

  4. 
      
guest9762
  1. 
      
  2. test comment

  3. 
      
Loading...