Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github: handle null commit author w/fallback to Git data #59

Merged
merged 1 commit into from
Feb 5, 2020

Conversation

dgw
Copy link
Member

@dgw dgw commented Feb 2, 2020

GitHub's API response for a commit handily includes a commit key with the raw author/committer data as displayed in Git, which we can use if the author is null at the GitHub level (i.e. no user matching the email address used in Git).

Fixes #55.

Demo comparing my production bot (running sopel-github 0.2.6) and test bot (running this patch):

<~dgw> https://github.com/sopel-irc/sopel/commit/30cddb270c0223db09f81a0cb7fc9f195ecfd0b3
<&Kaede> Unexpected error ('NoneType' object is not subscriptable) from dgw at 2020-02-02
         02:46:30.988810. Message was:
         https://github.com/sopel-irc/sopel/commit/30cddb270c0223db09f81a0cb7fc9f195ecfd0b3
<SopelTest> [GitHub] [sopel-irc/sopel] Michael Yanovich: initial commit | 10767 changes in
            142 files

GitHub's API response for a commit handily includes a `commit` key with
the raw author/committer data as displayed in Git, which we can use if
the `author` is `null` at the GitHub level (i.e. no user matching the
email address used in Git).
@dgw dgw added the bugfix label Feb 2, 2020
@dgw dgw added this to the 0.3.0 milestone Feb 2, 2020
@dgw dgw merged commit 037706e into master Feb 5, 2020
@dgw dgw deleted the missing-commit-author-login branch February 5, 2020 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error on missing commit author login
1 participant