Skip to content

fix: resolve author from PR links in GitHub release changelog#6898

Merged
birkskyum merged 1 commit intomainfrom
resolve-author-better
Mar 11, 2026
Merged

fix: resolve author from PR links in GitHub release changelog#6898
birkskyum merged 1 commit intomainfrom
resolve-author-better

Conversation

@birkskyum
Copy link
Member

@birkskyum birkskyum commented Mar 11, 2026

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

  • Chores
    • Enhanced changelog generation to include author attribution. Release notes now display contributor information for both pull requests and commits, with pull request-based attribution prioritized for better credit attribution.

@changeset-bot
Copy link

changeset-bot bot commented Mar 11, 2026

⚠️ No Changeset found

Latest commit: 66b8446

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7a4a7e02-101f-44ab-bdcf-21c6b49166b9

📥 Commits

Reviewing files that changed from the base of the PR and between bb291c6 and 66b8446.

📒 Files selected for processing (1)
  • scripts/create-github-release.mjs

📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
Author Resolution Enhancement
scripts/create-github-release.mjs
Added resolveAuthorForPR() function for GitHub API-based author fetching with caching. Modified resolveAuthorForCommit() to return username or null instead of empty string. Updated appendAuthors() logic to prioritize PR-based resolution over commit-based resolution with proper fallback handling.

Sequence Diagram

sequenceDiagram
    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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A rabbit hops through commits and PRs so fine,
Now authors get their moment in the changelog line!
With GitHub's grace and git's deep history,
We weave attribution's sweet symbiotic mystery.
From PR to commit, we chase each author's name,
And celebrate the ones who earned their fame! 🌟

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch resolve-author-better

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nx-cloud
Copy link

nx-cloud bot commented Mar 11, 2026

View your CI Pipeline Execution ↗ for commit 66b8446

Command Status Duration Result
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 4s View ↗
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-11 21:00:13 UTC

@birkskyum birkskyum merged commit 9f2795a into main Mar 11, 2026
12 of 13 checks passed
@birkskyum birkskyum deleted the resolve-author-better branch March 11, 2026 21:00
@github-actions
Copy link
Contributor

Bundle Size Benchmarks

  • Commit: bb291c68aaf6
  • Measured at: 2026-03-11T21:01:16.888Z
  • Baseline source: history:bb291c68aaf6
  • Dashboard: bundle-size history
Scenario Current (gzip) Delta vs baseline Raw Brotli Trend
react-router.minimal 87.09 KiB 0 B (0.00%) 274.11 KiB 75.68 KiB ▁▆▆████████
react-router.full 90.08 KiB 0 B (0.00%) 284.36 KiB 78.32 KiB ▁▃▃████████
solid-router.minimal 36.42 KiB 0 B (0.00%) 109.29 KiB 32.74 KiB ▁▅▅████████
solid-router.full 40.75 KiB 0 B (0.00%) 122.27 KiB 36.58 KiB ▁▅▅████████
vue-router.minimal 52.29 KiB 0 B (0.00%) 149.34 KiB 47.01 KiB ▁▅▅████████
vue-router.full 57.08 KiB 0 B (0.00%) 164.85 KiB 51.27 KiB ▁▅▅████████
react-start.minimal 99.66 KiB 0 B (0.00%) 313.26 KiB 86.22 KiB ▁▆▆████████
react-start.full 102.97 KiB 0 B (0.00%) 322.99 KiB 89.07 KiB ▁▄▄████████
solid-start.minimal 48.75 KiB 0 B (0.00%) 146.89 KiB 43.14 KiB ▁▄▄████████
solid-start.full 54.21 KiB 0 B (0.00%) 162.75 KiB 47.88 KiB ▁▅▅████████

Trend sparkline is historical gzip bytes ending with this PR measurement; lower is better.

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 11, 2026

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing resolve-author-better (66b8446) with main (bb291c6)

Open in CodSpeed

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