fix: resolve author from PR links in GitHub release changelog#6898
fix: resolve author from PR links in GitHub release changelog#6898
Conversation
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR enhances author attribution in changelog generation by implementing dual-path resolution: fetching PR authors via GitHub API (with caching) and falling back to git commit-based authors. PR references are resolved first before attempting commit hash lookup. Changes
Sequence DiagramsequenceDiagram
actor Script as Release Script
participant API as GitHub API
participant Git as Git Log
participant Cache as Author Cache
Script->>Script: Process changelog entry with PR ref or commit hash
alt PR Reference Found
Script->>Cache: Check if PR author cached
Cache-->>Script: Return cached author (if exists)
alt Author not cached
Script->>API: Fetch PR details and author
API-->>Script: Return PR author or error
Script->>Cache: Cache author or null
end
else Fallback to Commit Hash
Script->>Cache: Check if commit author cached
Cache-->>Script: Return cached author (if exists)
alt Author not cached
Script->>Git: Query commit author from git log
Git-->>Script: Return author or empty
Script->>Cache: Cache author or null
end
end
Script->>Script: Append "by `@username`" if author resolved
Script->>Script: Return augmented changelog entry
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 66b8446
☁️ Nx Cloud last updated this comment at |
Bundle Size Benchmarks
Trend sparkline is historical gzip bytes ending with this PR measurement; lower is better. |
Fix author attribution in GitHub release notes to handle changeset-generated changelog entries correctly
Changeset entries for actual changes use PR links, not commit hashes. The previous approach only matched commit hash links which only appear in "Updated dependencies" lines
Add resolveAuthorForPR that fetches the PR author via the GitHub API, and try PR resolution first before falling back to commit hash resolution
Summary by CodeRabbit