feat: resolve contributor GitHub usernames via API#4
Merged
machado144 merged 2 commits intomainfrom Mar 8, 2026
Merged
Conversation
Add GitHubService that resolves git commit emails to GitHub usernames using the search/users and search/commits API endpoints. Falls back gracefully when no GITHUB_TOKEN is available. Results are cached to avoid duplicate API calls.
16a1793 to
9a51bd9
Compare
✅ StructLint Validation
|
There was a problem hiding this comment.
Core Changes
- Introduced a new
GitHubServiceto resolve contributor GitHub usernames from commit emails using the GitHub API. - Integrated the
GitHubServiceinto thegeneratecommand to enrich release notes with GitHub usernames, falling back to existing logic if no token is provided. - Added a
github-tokeninput to the GitHub Action and a corresponding CLI flag, ensuring the token is passed to thegeneratestep in the release workflow.
Verdict
Approve: The changes are well-implemented, address the stated problem effectively, and include appropriate error handling and caching for the new GitHub API integration. The separation of concerns between generate and bump commands regarding GitHub token usage is also correctly handled.
Code review performed by GEMINI - gemini-2.5-flash.
machado144
added a commit
that referenced
this pull request
Mar 8, 2026
## Summary - Adds `GitHubService` that resolves git commit emails to GitHub usernames via GitHub API (`search/users` and `search/commits` endpoints) - Falls back gracefully when no `GITHUB_TOKEN` is available (noreply email extraction still works) - Caches lookups to avoid duplicate API calls per email - Passes `GITHUB_TOKEN` through action.yml and release workflow ## Why Release notes showed "Lucas Machado" instead of "@machado144" because the previous fix only handled `@users.noreply.github.com` emails, not regular email addresses. ## Test plan - [ ] `go build ./...` passes - [ ] `go test ./...` passes - [ ] Release workflow passes GITHUB_TOKEN to generate step
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GitHubServicethat resolves git commit emails to GitHub usernames via GitHub API (search/usersandsearch/commitsendpoints)GITHUB_TOKENis available (noreply email extraction still works)GITHUB_TOKENthrough action.yml and release workflowWhy
Release notes showed "Lucas Machado" instead of "@machado144" because the previous fix only handled
@users.noreply.github.comemails, not regular email addresses.Test plan
go build ./...passesgo test ./...passes