Skip to content

Commit 905838f

Browse files
authored
feat: enable require-pr-numbers flag for changelog generation (MetaMask#23661)
## **Description** This PR updates the changelog workflows to use the new `@metamask/auto-changelog@5.3.0` which always filters out direct commits without PR numbers. This ensures all changelog entries represent reviewed and approved changes. **Changes:** - Update `@metamask/auto-changelog` from `^5.1.0` to `^5.3.0` - Update `update-release-changelog` workflow to use `github-tools@v1.1.2` The `--requirePrNumbers` flag is now always applied by default in github-tools, so no additional configuration is needed. This aligns `metamask-mobile` with `metamask-extension` for consistent changelog generation across platforms. ## **Changelog** CHANGELOG entry: null ## **Related issues** - Related to: [MetaMask/metamask-extension#38520](MetaMask/metamask-extension#38520) - ✅ [MetaMask/auto-changelog#253](MetaMask/auto-changelog#253) - Merged (v5.3.0) - ✅ [MetaMask/github-tools#181](MetaMask/github-tools#181) - Merged and released as v1.1.2 ## **Manual testing steps** ```gherkin Feature: Changelog generation with PR number filtering Scenario: Only PR commits appear in changelog Given a release branch exists When a commit with an associated PR is merged Then the changelog should include that commit When a direct commit without PR is pushed Then the changelog should NOT include that commit ``` Tested on [consensys-test/metamask-extension-test](https://github.com/consensys-test/metamask-extension-test) with `release/1100.0.0`: - [Generated changelog](https://github.com/consensys-test/metamask-extension-test/blob/release/1100.0.0-Changelog/CHANGELOG.md) ## **Screenshots/Recordings** ### **Before** Direct commits without PR numbers would appear in the changelog. ### **After** Only commits with PR numbers (representing reviewed changes) appear in the changelog. ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent fa5f8bc commit 905838f

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/update-release-changelog.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ jobs:
4848
pull-requests: write
4949
steps:
5050
- name: Update Release Changelog
51-
uses: MetaMask/github-tools/.github/actions/update-release-changelog@v1.1.0
51+
uses: MetaMask/github-tools/.github/actions/update-release-changelog@v1.1.2
5252
with:
5353
release-branch: ${{ github.ref_name }}
5454
repository-url: ${{ github.server_url }}/${{ github.repository }}
5555
platform: mobile
5656
previous-version-ref: 'null'
57-
github-tools-version: v1.1.0
57+
github-tools-version: v1.1.2
5858
github-token: ${{ secrets.PR_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@
497497
"@lavamoat/allow-scripts": "^3.0.4",
498498
"@lavamoat/git-safe-dependencies": "^0.2.1",
499499
"@metamask/abi-utils": "^3.0.0",
500-
"@metamask/auto-changelog": "^5.1.0",
500+
"@metamask/auto-changelog": "^5.3.0",
501501
"@metamask/browser-passworder": "^5.0.0",
502502
"@metamask/build-utils": "^3.0.0",
503503
"@metamask/eslint-config-typescript": "^9.0.0",

yarn.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7587,9 +7587,9 @@ __metadata:
75877587
languageName: node
75887588
linkType: hard
75897589

7590-
"@metamask/auto-changelog@npm:^5.1.0":
7591-
version: 5.1.0
7592-
resolution: "@metamask/auto-changelog@npm:5.1.0"
7590+
"@metamask/auto-changelog@npm:^5.3.0":
7591+
version: 5.3.0
7592+
resolution: "@metamask/auto-changelog@npm:5.3.0"
75937593
dependencies:
75947594
"@octokit/rest": "npm:^20.0.0"
75957595
diff: "npm:^5.0.0"
@@ -7600,7 +7600,7 @@ __metadata:
76007600
prettier: ">=3.0.0"
76017601
bin:
76027602
auto-changelog: dist/cli.mjs
7603-
checksum: 10/ee9f651c313a2377a21a304383f56f1872b4ce6411a0b61cf0b70b23bff9d3204332cd5a052cdfcaf363ce15424a7a1fdbde99a6b4352f2472fbe6b6d27c5791
7603+
checksum: 10/5381c2b1efbade000bafbbee7b1becbee1787b9f24849352d16ddd3b14f511f865b3478250301f3d22f98fe0208690f62f166a476e64d38ed58361d816a673b6
76047604
languageName: node
76057605
linkType: hard
76067606

@@ -35962,7 +35962,7 @@ __metadata:
3596235962
"@metamask/app-metadata-controller": "npm:^2.0.0"
3596335963
"@metamask/approval-controller": "npm:^8.0.0"
3596435964
"@metamask/assets-controllers": "patch:@metamask/assets-controllers@npm%3A92.0.0#~/.yarn/patches/@metamask-assets-controllers-npm-92.0.0-ea998cb0bd.patch"
35965-
"@metamask/auto-changelog": "npm:^5.1.0"
35965+
"@metamask/auto-changelog": "npm:^5.3.0"
3596635966
"@metamask/base-controller": "npm:^9.0.0"
3596735967
"@metamask/bitcoin-wallet-snap": "npm:^1.8.0"
3596835968
"@metamask/bridge-controller": "npm:^61.0.0"

0 commit comments

Comments
 (0)