Skip to content

feat: resolve contributor GitHub usernames via API#4

Merged
machado144 merged 2 commits intomainfrom
feat/github-username-resolution
Mar 8, 2026
Merged

feat: resolve contributor GitHub usernames via API#4
machado144 merged 2 commits intomainfrom
feat/github-username-resolution

Conversation

@machado144
Copy link
Contributor

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

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.
@machado144 machado144 force-pushed the feat/github-username-resolution branch from 16a1793 to 9a51bd9 Compare March 8, 2026 15:31
@github-actions
Copy link

github-actions bot commented Mar 8, 2026

✅ StructLint Validation

Metric Count
Checks passed 49
Violations 0

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core Changes

  • Introduced a new GitHubService to resolve contributor GitHub usernames from commit emails using the GitHub API.
  • Integrated the GitHubService into the generate command to enrich release notes with GitHub usernames, falling back to existing logic if no token is provided.
  • Added a github-token input to the GitHub Action and a corresponding CLI flag, ensuring the token is passed to the generate step 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 machado144 merged commit 217fd09 into main Mar 8, 2026
5 checks passed
@machado144 machado144 deleted the feat/github-username-resolution branch March 8, 2026 15:32
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
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.

1 participant