Skip to content

feat: add changesets changelog pull request resolver - #84

Merged
GuillaumeRx merged 4 commits into
mainfrom
gr/changesets-changelog-implementation
Oct 16, 2026
Merged

GuillaumeRx merged 4 commits into
mainfrom
gr/changesets-changelog-implementation

Conversation

@GuillaumeRx

Copy link
Copy Markdown
Contributor

Explanation

This is the first stacked PR for @metamask/changesets-changelog. It adds the local Git commit-subject helper used to build pull request links.

The helper runs git show -s --format=%s <commit> and extracts pull request numbers from squash-merge subjects such as Add a feature (#1234) and merge subjects such as Merge pull request #1234 from owner/branch. It does not call the GitHub API or require a token. It throws when commit metadata is missing, unreadable, empty, or does not contain a pull request number.

The generated greeting placeholder is removed. Rendering exports will follow in later stacked PRs.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@GuillaumeRx
GuillaumeRx marked this pull request as ready for review October 15, 2026 13:01
@GuillaumeRx
GuillaumeRx requested a review from a team as a code owner October 15, 2026 13:01
@GuillaumeRx
GuillaumeRx deployed to default-branch October 15, 2026 13:05 — with GitHub Actions Active
* @param subject - The Git commit subject.
* @returns The pull request number.
*/
export function extractPullRequestNumber(subject: string): string {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we need to export these at index.ts ?

export { extractPullRequestNumber, getPullRequestLink } from './resolve-pull-request.js';

@cryptodev-2s cryptodev-2s Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All right it looks like from PR description this will come up in a future PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No these will only be used internally. this is the changesets plugin so I would keep the exports to only the plugin required functions (they'll come after)

@GuillaumeRx
GuillaumeRx added this pull request to the merge queue Oct 16, 2026
Merged via the queue into main with commit 44a1f5b Oct 16, 2026
52 checks passed
@GuillaumeRx
GuillaumeRx deleted the gr/changesets-changelog-implementation branch October 16, 2026 09:28

This branch was successfully deployed

1 active deployment
default-branch — 0a246908 Deployed Oct 15, 2026 by GuillaumeRx via Determine whether this PR is a release PR #97
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.

2 participants