Skip to content

[octocrab] Allow committer to be Author *or* GitUser #4

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

Merged
merged 1 commit into from
Apr 16, 2025

Conversation

nataliejameson
Copy link

@nataliejameson nataliejameson commented Apr 15, 2025

In some cases it seems the Compare Commits endpoint (/repos/{owner}/{repo}/compare/{base}...{head}) will return either a full Author object for committer and author of each commit or just the name, email, etc that are in GitUser. This appears to be the case when e.g. a bot does the commit that github cannot tie to a user specifically? In any case, this change allows us to deserialize that commit comparison endpoint's results while also allowing us to get full information if it's available.

@nataliejameson nataliejameson changed the title Make the login field of Author optional [octocrab] Allow committer to be Author *or* GitUser Apr 15, 2025
In some cases it seems the Compare Commits endpoint (`/repos/{owner}/{repo}/compare/{base}...{head}`) will return *either* a full Author object for committer and author of each commit *or* just the name, email, etc that are in GitUser. This appears to be the case when e.g. a bot does the commit that github cannot tie to a user specifically? In any case, this change allows us to deserialize that commit comparison endpoint's results while also allowing us to get full information if it's available.

Also bump the version
@nataliejameson nataliejameson force-pushed the nmj/git-user-instead-of-author branch from 6d4b8a7 to 4870b13 Compare April 15, 2025 18:32
@nataliejameson nataliejameson merged commit cd986d5 into discord Apr 16, 2025
20 of 22 checks passed
nataliejameson added a commit that referenced this pull request May 1, 2025
In #4 , this was changed from Author -> GitUser. Prefer to allow both of these so we can pull user logins for commits without having to guess from their email.
nataliejameson added a commit that referenced this pull request May 2, 2025
In #4 , this was changed from Author -> GitUser. Prefer to allow both of these so we can pull user logins for commits without having to guess from their email.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants