Fix parsing Bitbucket commits without a matching user account.
Review Request #8818 — Created March 16, 2017 and submitted
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.
- Change Summary:
-
Failed to
git add
some fixed unit test changes. - Commit:
-
1c2fc35e3db053679a97d2aecd194168ea28b3d5c966d172a0a1a63842c6c3a798cab80833861fe9