Skip to content

fix(auto-changelog): parse combined short PR references like (#A, #B) - #130

Merged
HowardBraham merged 1 commit into
mainfrom
parse-combined-short-pr-refs
Oct 23, 2026
Merged

HowardBraham merged 1 commit into
mainfrom
parse-combined-short-pr-refs

Conversation

@HowardBraham

Copy link
Copy Markdown
Contributor

Fixes how auto-changelog reads a combined short PR reference such as (#79, #91) in an existing changelog entry. These entries are written by the AI-powered release workflows and by hand-merged entries.

Previously extractPrLinks returned no PR numbers for that form. The long-link form, ([#A](url), [#B](url)), was already parsed correctly. As a result, PRs documented as (#A, #B) in an older release section were treated as undocumented. They were regenerated into the next release, producing duplicate entries. We saw this in the Mobile 8.18.0 changelog.

  • Now parses a comma-separated group of short PR references as separate PRs
    • Example: - Fixed a bug (#79, #91) now yields PRs 79 and 91, rather than none
  • Unchanged: a single (#N), and the long-link forms

Tests cover the combined group, and both fail without the fix.

Validation

Verified end to end on a fork of MetaMask/metamask-extension using the release-changelog workflow:

  • Fixture: an older section documents (#81, #82), and a new commit for #82 follows it.
    • Without this change, #82 was regenerated into the new release section.
    • With this change, #82 is skipped as already documented, and the other entries are unchanged.

@HowardBraham HowardBraham self-assigned this Oct 23, 2026
@HowardBraham
HowardBraham requested a review from a team as a code owner October 23, 2026 06:52
@HowardBraham
HowardBraham deployed to default-branch October 23, 2026 06:52 — with GitHub Actions Active

@mcmire mcmire left a comment

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.

LGTM. Made a comment about the changelog but it is non-blocking.

Comment on lines 12 to +19
- Improve populating changelogs from commits/PRs to prepare for AI-powered release workflows in MetaMask clients ([#127](https://github.com/MetaMask/release-tools/pull/127))
- Handle extracting the PR number from a Runway-generated cherry-pick commit subject even when the subject has been hard-wrapped
- Repair a Markdown link that accidentally splits a word
- Handle parsing the PR number from a malformed link
- Don't skip a PR that has a non-empty `CHANGELOG entry:` line even when it also has a `no-changelog` label
- Use the trailing squash-merge PR reference when a commit subject includes both an original PR and its own PR
- Parse a combined short PR reference such as `(#79, #91)` in an existing changelog entry as separate PRs ([#130](https://github.com/MetaMask/release-tools/pull/130))
- Previously no PR numbers were extracted, so PRs documented this way were regenerated as duplicate entries in later releases

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.

Nit: Should this be grouped with the list of improvements listed above?

Suggested change
- Previously no PR numbers were extracted, so PRs documented this way were regenerated as duplicate entries in later releases
- Improve populating changelogs from commits/PRs to prepare for AI-powered release workflows in MetaMask clients ([#127](https://github.com/MetaMask/release-tools/pull/127), [#130](https://github.com/MetaMask/release-tools/pull/130))
- Handle extracting the PR number from a Runway-generated cherry-pick commit subject even when the subject has been hard-wrapped
- Repair a Markdown link that accidentally splits a word
- Handle parsing the PR number from a malformed link
- Don't skip a PR that has a non-empty `CHANGELOG entry:` line even when it also has a `no-changelog` label
- Use the trailing squash-merge PR reference when a commit subject includes both an original PR and its own PR
- Parse a combined short PR reference such as `(#79, #91)` in an existing changelog entry as separate PRs (previously no PR numbers were extracted, so PRs documented this way were regenerated as duplicate entries in later releases)

@HowardBraham
HowardBraham added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 9d3d260 Oct 23, 2026
58 checks passed
@HowardBraham
HowardBraham deleted the parse-combined-short-pr-refs branch October 23, 2026 14:45
JadeCong pushed a commit to CloudEngineHub/metamask-extension that referenced this pull request Oct 29, 2026
…MetaMask#47463)

## **Description**

This is the very last step in a chain of PRs to turn on fully-autonomous
CHANGELOG generation in Extension.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

### Previous PRs in the chain

#### release-tools/auto-changelog
MetaMask/release-tools#127
MetaMask/release-tools#130

#### github-tools
MetaMask/github-tools#300
MetaMask/github-tools#301
MetaMask/github-tools#303

<!--## **Manual testing steps**
## **Screenshots/Recordings**
## **Pre-merge author checklist**
## **Pre-merge reviewer checklist**-->

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Workflow-only change that adds a CI secret env var and removes an
action input; no runtime extension code or user-facing behavior changes.
> 
> **Overview**
> Turns on the **AI changelog proofreader** for release changelog
automation by passing **`AI_ANALYZER_LITELLM_KEY`** into the
`update-release-changelog` GitHub Action (same LiteLLM secret pattern as
other AI workflows).
> 
> Also **drops the explicit `previous-version-ref: 'null'`** input so
previous-version resolution is handled by the updated action rather than
being hard-coded in this repo.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
c801241. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
darkwing pushed a commit to darkwing/metamask-mobile that referenced this pull request Oct 29, 2026
…MetaMask#38444)

## **Description**

This is the very last step in a chain of PRs to turn on fully-autonomous
CHANGELOG generation in Mobile.

## **Changelog**

CHANGELOG entry: null

## **Related issues**

### Previous PRs in the chain

#### release-tools/auto-changelog
MetaMask/release-tools#127
MetaMask/release-tools#130

#### github-tools
MetaMask/github-tools#300
MetaMask/github-tools#301
MetaMask/github-tools#303

<!--## **Manual testing steps**
## **Screenshots/Recordings**
## **Pre-merge author checklist**
## **Pre-merge reviewer checklist**-->

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Changes how release and OTA hotfix changelogs are produced in CI;
misconfiguration could break changelog PRs or tags, though behavior is
intended to match the removed script via github-tools v1.
> 
> **Overview**
> Mobile release changelog automation no longer runs the local
**`run-update-release-changelog-mobile.sh`** wrapper or manual
**github-tools** checkout, Node setup, and **`yarn`** steps.
**`create-release-pr.yml`** (OTA hotfix path) and
**`update-release-changelog.yml`** now call
**`MetaMask/github-tools/.github/actions/update-release-changelog@v1`**,
which owns branch checkout, version derivation from **`release/X.Y.Z`**
/ **`release/X.Y.Z-ota`**, and concurrent Runway updates on the release
branch.
> 
> This PR also threads **`AI_ANALYZER_LITELLM_KEY`** from
**`auto-create-release-pr.yml`** into **`create-release-pr.yml`** as an
optional reusable-workflow secret and passes it into both changelog
action steps so the new AI changelog proofreader can run during
autonomous **`CHANGELOG.md`** generation.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
1abeae5. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: howard <howard@example.com>

This branch was successfully deployed

1 active deployment
default-branch — a5ec7e46 Deployed Oct 23, 2026 by HowardBraham via Determine whether this PR is a release PR #149
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