Fix parsing Bitbucket commits without a matching user account.
Review Request #505 — Created March 24, 2017 and updated
Information | |
---|---|
guest5620 | |
Review Board | |
07a401b... | |
Reviewers | |
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/
-
-
reviewboard/hostingsvcs/bitbucket.py (Diff revision 1) Markdown
- Improve commenting
- Improve variable names.