From 29cb06aeb9baa4a36fd5f3e1faf5e6e860e16a19 Mon Sep 17 00:00:00 2001 From: Pavel Dvorkin Date: Wed, 10 Sep 2025 09:57:53 -0400 Subject: [PATCH 01/10] Test changelog automation https://github.com/MetaMask/auto-changelog/pull/247 --- .github/scripts/create-platform-release-pr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/create-platform-release-pr.sh b/.github/scripts/create-platform-release-pr.sh index 3a11e17b..42b77001 100755 --- a/.github/scripts/create-platform-release-pr.sh +++ b/.github/scripts/create-platform-release-pr.sh @@ -319,7 +319,7 @@ create_changelog_pr() { # Generate Changelog and Test Plan echo "Generating changelog via auto-changelog.." - npx @metamask/auto-changelog@4.1.0 update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize + npx @metamask/auto-changelog@4.1.0 update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink # Skip commits.csv for hotfix releases (previous_version_ref is literal "null") # - When we create a new major/minor release, we fetch all commits included in the release, by fetching the diff between HEAD and previous version reference. From f3d68973e08f6319fd8503cf63b02c0cfd579257 Mon Sep 17 00:00:00 2001 From: Pavel Dvorkin Date: Wed, 10 Sep 2025 10:17:23 -0400 Subject: [PATCH 02/10] Test changelog automation https://github.com/MetaMask/auto-changelog/pull/247 --- .github/scripts/create-platform-release-pr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/create-platform-release-pr.sh b/.github/scripts/create-platform-release-pr.sh index 42b77001..33db0b66 100755 --- a/.github/scripts/create-platform-release-pr.sh +++ b/.github/scripts/create-platform-release-pr.sh @@ -319,7 +319,7 @@ create_changelog_pr() { # Generate Changelog and Test Plan echo "Generating changelog via auto-changelog.." - npx @metamask/auto-changelog@4.1.0 update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink + npx github:MetaMask/auto-changelog#parse-changelog-entry-adjustments update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink # Skip commits.csv for hotfix releases (previous_version_ref is literal "null") # - When we create a new major/minor release, we fetch all commits included in the release, by fetching the diff between HEAD and previous version reference. From 65c9c9e8b1caa0ba1f89e5b30a048f117bea13e8 Mon Sep 17 00:00:00 2001 From: Pavel Dvorkin Date: Wed, 10 Sep 2025 10:35:31 -0400 Subject: [PATCH 03/10] Test changelog automation https://github.com/MetaMask/auto-changelog/pull/247 --- .github/scripts/create-platform-release-pr.sh | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/create-platform-release-pr.sh b/.github/scripts/create-platform-release-pr.sh index 33db0b66..bfe70e01 100755 --- a/.github/scripts/create-platform-release-pr.sh +++ b/.github/scripts/create-platform-release-pr.sh @@ -319,7 +319,7 @@ create_changelog_pr() { # Generate Changelog and Test Plan echo "Generating changelog via auto-changelog.." - npx github:MetaMask/auto-changelog#parse-changelog-entry-adjustments update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink + npx @metamask/auto-changelog update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink # Skip commits.csv for hotfix releases (previous_version_ref is literal "null") # - When we create a new major/minor release, we fetch all commits included in the release, by fetching the diff between HEAD and previous version reference. diff --git a/package.json b/package.json index 4eb16b0d..5ff884a2 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "update-release-sheet": "node .github/scripts/update-release-sheet.mjs" }, "dependencies": { - "@metamask/auto-changelog": "^3.4.4", + "@metamask/auto-changelog": "github:MetaMask/auto-changelog#parse-changelog-entry-adjustments", "@metamask/utils": "^7.1.0", "@octokit/graphql": "^7.0.1", "@octokit/request": "^8.1.1", From b563be311e1f84ecac1c21f59b64dbd241278d44 Mon Sep 17 00:00:00 2001 From: Pavel Dvorkin Date: Wed, 10 Sep 2025 10:48:08 -0400 Subject: [PATCH 04/10] Test changelog automation https://github.com/MetaMask/auto-changelog/pull/247 --- .github/scripts/create-platform-release-pr.sh | 2 +- yarn.lock | 143 +++++++++++++++++- 2 files changed, 136 insertions(+), 9 deletions(-) diff --git a/.github/scripts/create-platform-release-pr.sh b/.github/scripts/create-platform-release-pr.sh index bfe70e01..fcf46a87 100755 --- a/.github/scripts/create-platform-release-pr.sh +++ b/.github/scripts/create-platform-release-pr.sh @@ -319,7 +319,7 @@ create_changelog_pr() { # Generate Changelog and Test Plan echo "Generating changelog via auto-changelog.." - npx @metamask/auto-changelog update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink + npx --no-install @metamask/auto-changelog update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink # Skip commits.csv for hotfix releases (previous_version_ref is literal "null") # - When we create a new major/minor release, we fetch all commits included in the release, by fetching the diff between HEAD and previous version reference. diff --git a/yarn.lock b/yarn.lock index 80291c24..14ea54d7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -941,18 +941,20 @@ __metadata: languageName: node linkType: hard -"@metamask/auto-changelog@npm:^3.4.4": - version: 3.4.4 - resolution: "@metamask/auto-changelog@npm:3.4.4" +"@metamask/auto-changelog@github:MetaMask/auto-changelog#parse-changelog-entry-adjustments": + version: 5.0.2 + resolution: "@metamask/auto-changelog@https://github.com/MetaMask/auto-changelog.git#commit=3298e5259680fc2d3a917ec7f05268be9ad7a4cd" dependencies: + "@octokit/rest": "npm:^20.0.0" diff: "npm:^5.0.0" execa: "npm:^5.1.1" - prettier: "npm:^2.8.8" semver: "npm:^7.3.5" yargs: "npm:^17.0.1" + peerDependencies: + prettier: ">=3.0.0" bin: - auto-changelog: dist/cli.js - checksum: 10/70e98529a153ebeab10410dbc3f567014999f77ed82f2b52f1b36501b28a4e3614c809a90c89600a739d7710595bfecc30e2260410e6afac7539f8db65a48f2c + auto-changelog: dist/cli.mjs + checksum: 10/df2e1604626f415b2bda6ed5bafc35fecb2b5e0834bfcfb2328f387a351372ac996ed64f3f8ad6eb4a817a8bb1186d3030cba20e6fe2f6a602284c0bc9082652 languageName: node linkType: hard @@ -1012,7 +1014,7 @@ __metadata: dependencies: "@lavamoat/allow-scripts": "npm:^2.3.1" "@lavamoat/preinstall-always-fail": "npm:^1.0.0" - "@metamask/auto-changelog": "npm:^3.4.4" + "@metamask/auto-changelog": "github:MetaMask/auto-changelog#parse-changelog-entry-adjustments" "@metamask/eslint-config": "npm:^12.0.0" "@metamask/eslint-config-jest": "npm:^12.0.0" "@metamask/eslint-config-nodejs": "npm:^12.0.0" @@ -1196,6 +1198,13 @@ __metadata: languageName: node linkType: hard +"@octokit/auth-token@npm:^4.0.0": + version: 4.0.0 + resolution: "@octokit/auth-token@npm:4.0.0" + checksum: 10/60e42701e341d700f73c518c7a35675d36d79fa9d5e838cc3ade96d147e49f5ba74db2e07b2337c2b95aaa540aa42088116df2122daa25633f9e70a2c8785c44 + languageName: node + linkType: hard + "@octokit/core@npm:^4.2.1": version: 4.2.4 resolution: "@octokit/core@npm:4.2.4" @@ -1211,6 +1220,21 @@ __metadata: languageName: node linkType: hard +"@octokit/core@npm:^5.0.2": + version: 5.2.2 + resolution: "@octokit/core@npm:5.2.2" + dependencies: + "@octokit/auth-token": "npm:^4.0.0" + "@octokit/graphql": "npm:^7.1.0" + "@octokit/request": "npm:^8.4.1" + "@octokit/request-error": "npm:^5.1.1" + "@octokit/types": "npm:^13.0.0" + before-after-hook: "npm:^2.2.0" + universal-user-agent: "npm:^6.0.0" + checksum: 10/0c39b43e562a8acf8f1d563a85f3c0e55e6d678ae16a4b3d6341060b3d5315c021dfa1bd15dc818fa4cc5612eb5cd518b13cb7c194e3c92ca3da9c0dc6a854b5 + languageName: node + linkType: hard + "@octokit/endpoint@npm:^7.0.0": version: 7.0.6 resolution: "@octokit/endpoint@npm:7.0.6" @@ -1233,6 +1257,16 @@ __metadata: languageName: node linkType: hard +"@octokit/endpoint@npm:^9.0.6": + version: 9.0.6 + resolution: "@octokit/endpoint@npm:9.0.6" + dependencies: + "@octokit/types": "npm:^13.1.0" + universal-user-agent: "npm:^6.0.0" + checksum: 10/2bf776423365ee926bf3f722a664e52f1070758eff4a176279fb132103fd0c76e3541f83ace49bbad9a64f9c9b8de453be565ca8d6136989e9514dea65380ecf + languageName: node + linkType: hard + "@octokit/graphql@npm:^5.0.0": version: 5.0.6 resolution: "@octokit/graphql@npm:5.0.6" @@ -1255,6 +1289,17 @@ __metadata: languageName: node linkType: hard +"@octokit/graphql@npm:^7.1.0": + version: 7.1.1 + resolution: "@octokit/graphql@npm:7.1.1" + dependencies: + "@octokit/request": "npm:^8.4.1" + "@octokit/types": "npm:^13.0.0" + universal-user-agent: "npm:^6.0.0" + checksum: 10/9a7a65fa84df795b0acb5315dae5a4a5a042a01dde0c88974df180a1c02b9b8e61cae013be32461b11ee1d507a8f778f3b7f37dfa3b371771332cb8efcd01f29 + languageName: node + linkType: hard + "@octokit/openapi-types@npm:^18.0.0": version: 18.0.0 resolution: "@octokit/openapi-types@npm:18.0.0" @@ -1262,6 +1307,24 @@ __metadata: languageName: node linkType: hard +"@octokit/openapi-types@npm:^24.2.0": + version: 24.2.0 + resolution: "@octokit/openapi-types@npm:24.2.0" + checksum: 10/000897ebc6e247c2591049d6081e95eb5636f73798dadd695ee6048496772b58065df88823e74a760201828545a7ac601dd3c1bcd2e00079a62a9ee9d389409c + languageName: node + linkType: hard + +"@octokit/plugin-paginate-rest@npm:11.4.4-cjs.2": + version: 11.4.4-cjs.2 + resolution: "@octokit/plugin-paginate-rest@npm:11.4.4-cjs.2" + dependencies: + "@octokit/types": "npm:^13.7.0" + peerDependencies: + "@octokit/core": 5 + checksum: 10/e0f696b3b69febe4e7c736d909065871f38bb8346a07f19a9c83246a02972568ac672667db472f846baef20a9611adf26ce8f0f189a11004c4b6618765078e19 + languageName: node + linkType: hard + "@octokit/plugin-paginate-rest@npm:^6.1.2": version: 6.1.2 resolution: "@octokit/plugin-paginate-rest@npm:6.1.2" @@ -1283,6 +1346,26 @@ __metadata: languageName: node linkType: hard +"@octokit/plugin-request-log@npm:^4.0.0": + version: 4.0.1 + resolution: "@octokit/plugin-request-log@npm:4.0.1" + peerDependencies: + "@octokit/core": 5 + checksum: 10/fd8c0a201490cba00084689a0d1d54fc7b5ab5b6bdb7e447056b947b1754f78526e9685400eab10d3522bfa7b5bc49c555f41ec412c788610b96500b168f3789 + languageName: node + linkType: hard + +"@octokit/plugin-rest-endpoint-methods@npm:13.3.2-cjs.1": + version: 13.3.2-cjs.1 + resolution: "@octokit/plugin-rest-endpoint-methods@npm:13.3.2-cjs.1" + dependencies: + "@octokit/types": "npm:^13.8.0" + peerDependencies: + "@octokit/core": ^5 + checksum: 10/479827e62466e55bc1a50129d51597807bddc6c909e56be9e8dd9c1a91efa0f466a2f56b7d80438649e21ab0a3a195f840b3fccf2ae7f11fb0a919db8e62bc62 + languageName: node + linkType: hard + "@octokit/plugin-rest-endpoint-methods@npm:^7.1.2": version: 7.2.3 resolution: "@octokit/plugin-rest-endpoint-methods@npm:7.2.3" @@ -1316,6 +1399,17 @@ __metadata: languageName: node linkType: hard +"@octokit/request-error@npm:^5.1.1": + version: 5.1.1 + resolution: "@octokit/request-error@npm:5.1.1" + dependencies: + "@octokit/types": "npm:^13.1.0" + deprecation: "npm:^2.0.0" + once: "npm:^1.4.0" + checksum: 10/6ad98626407ba57bb33fa197611be74bee1dd9abc8d5d845648d6a2a04aa6840c0eb7f4be341d55dfcab5bc19181ad5fd25194869a7aaac6245f74b3a14d9662 + languageName: node + linkType: hard + "@octokit/request@npm:^6.0.0": version: 6.2.8 resolution: "@octokit/request@npm:6.2.8" @@ -1343,6 +1437,18 @@ __metadata: languageName: node linkType: hard +"@octokit/request@npm:^8.4.1": + version: 8.4.1 + resolution: "@octokit/request@npm:8.4.1" + dependencies: + "@octokit/endpoint": "npm:^9.0.6" + "@octokit/request-error": "npm:^5.1.1" + "@octokit/types": "npm:^13.1.0" + universal-user-agent: "npm:^6.0.0" + checksum: 10/2b2c9131cc9b608baeeef8ce2943768cc9db5fbe36a665f734a099bd921561c760e4391fbdf39d5aefb725db26742db1488c65624940ef7cec522e10863caa5e + languageName: node + linkType: hard + "@octokit/rest@npm:^19.0.13": version: 19.0.13 resolution: "@octokit/rest@npm:19.0.13" @@ -1355,6 +1461,18 @@ __metadata: languageName: node linkType: hard +"@octokit/rest@npm:^20.0.0": + version: 20.1.2 + resolution: "@octokit/rest@npm:20.1.2" + dependencies: + "@octokit/core": "npm:^5.0.2" + "@octokit/plugin-paginate-rest": "npm:11.4.4-cjs.2" + "@octokit/plugin-request-log": "npm:^4.0.0" + "@octokit/plugin-rest-endpoint-methods": "npm:13.3.2-cjs.1" + checksum: 10/e0759fdbf18bc96f68299b4ca04d7102ce861e8508f01e9e580ed9c1e19d4cc20d150635161e360375f1c52c95e54bf6b56aaae16f943a93d6dcb38a51d8a23e + languageName: node + linkType: hard + "@octokit/tsconfig@npm:^1.0.2": version: 1.0.2 resolution: "@octokit/tsconfig@npm:1.0.2" @@ -1380,6 +1498,15 @@ __metadata: languageName: node linkType: hard +"@octokit/types@npm:^13.0.0, @octokit/types@npm:^13.1.0, @octokit/types@npm:^13.7.0, @octokit/types@npm:^13.8.0": + version: 13.10.0 + resolution: "@octokit/types@npm:13.10.0" + dependencies: + "@octokit/openapi-types": "npm:^24.2.0" + checksum: 10/32f8f5010d7faae128b0cdd0c221f0ca8c3781fe44483ecd87162b3da507db667f7369acda81340f6e2c9c374d9a938803409c6085c2c01d98210b6c58efb99a + languageName: node + linkType: hard + "@octokit/types@npm:^9.0.0, @octokit/types@npm:^9.2.3": version: 9.3.2 resolution: "@octokit/types@npm:9.3.2" @@ -6886,7 +7013,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^2.7.1, prettier@npm:^2.8.8": +"prettier@npm:^2.7.1": version: 2.8.8 resolution: "prettier@npm:2.8.8" bin: From 110414a50f67f8b749adbf5b50f701b395a74023 Mon Sep 17 00:00:00 2001 From: Pavel Dvorkin Date: Wed, 10 Sep 2025 14:33:42 -0400 Subject: [PATCH 05/10] Test changelog automation https://github.com/MetaMask/auto-changelog/pull/247 --- .github/scripts/create-platform-release-pr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/create-platform-release-pr.sh b/.github/scripts/create-platform-release-pr.sh index fcf46a87..619dd1db 100755 --- a/.github/scripts/create-platform-release-pr.sh +++ b/.github/scripts/create-platform-release-pr.sh @@ -319,7 +319,7 @@ create_changelog_pr() { # Generate Changelog and Test Plan echo "Generating changelog via auto-changelog.." - npx --no-install @metamask/auto-changelog update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink + npx --yes github:MetaMask/auto-changelog#changelog-entry-adjustments update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink # Skip commits.csv for hotfix releases (previous_version_ref is literal "null") # - When we create a new major/minor release, we fetch all commits included in the release, by fetching the diff between HEAD and previous version reference. From 698cdf735d9243c367027a08f199f047ec368a70 Mon Sep 17 00:00:00 2001 From: Pavel Dvorkin Date: Wed, 10 Sep 2025 14:50:45 -0400 Subject: [PATCH 06/10] Test changelog automation https://github.com/MetaMask/auto-changelog/pull/247 --- .github/scripts/create-platform-release-pr.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/scripts/create-platform-release-pr.sh b/.github/scripts/create-platform-release-pr.sh index 619dd1db..1bd688f2 100755 --- a/.github/scripts/create-platform-release-pr.sh +++ b/.github/scripts/create-platform-release-pr.sh @@ -319,7 +319,14 @@ create_changelog_pr() { # Generate Changelog and Test Plan echo "Generating changelog via auto-changelog.." - npx --yes github:MetaMask/auto-changelog#changelog-entry-adjustments update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink + if [ -f "./github-tools/node_modules/@metamask/auto-changelog/dist/cli.mjs" ]; then + echo "Using local @metamask/auto-changelog from github-tools node_modules" + node ./github-tools/node_modules/@metamask/auto-changelog/dist/cli.mjs update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink \ + || { echo "Local auto-changelog failed; falling back to GitHub branch"; npx --yes github:MetaMask/auto-changelog#parse-changelog-entry-adjustments update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink; } + else + echo "Local @metamask/auto-changelog not found; falling back to GitHub branch" + npx --yes github:MetaMask/auto-changelog#parse-changelog-entry-adjustments update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink + fi # Skip commits.csv for hotfix releases (previous_version_ref is literal "null") # - When we create a new major/minor release, we fetch all commits included in the release, by fetching the diff between HEAD and previous version reference. @@ -359,7 +366,7 @@ create_changelog_pr() { ls -ltra corepack prepare yarn@4.5.1 --activate # This can't be done from the actions context layer due to the upstream repository having it's own context set with yarn - yarn --cwd install + yarn install echo "Generating test plan csv.." yarn run gen:commits "${platform}" "${DIFF_BASE}" "${release_branch_name}" "${PROJECT_GIT_DIR}" From 8d2c8f86259b98abc1c0c00134d7f5e9af3a0c41 Mon Sep 17 00:00:00 2001 From: Pavel Dvorkin Date: Wed, 10 Sep 2025 14:56:59 -0400 Subject: [PATCH 07/10] Test changelog automation https://github.com/MetaMask/auto-changelog/pull/247 --- .github/scripts/create-platform-release-pr.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/scripts/create-platform-release-pr.sh b/.github/scripts/create-platform-release-pr.sh index 1bd688f2..fcf46a87 100755 --- a/.github/scripts/create-platform-release-pr.sh +++ b/.github/scripts/create-platform-release-pr.sh @@ -319,14 +319,7 @@ create_changelog_pr() { # Generate Changelog and Test Plan echo "Generating changelog via auto-changelog.." - if [ -f "./github-tools/node_modules/@metamask/auto-changelog/dist/cli.mjs" ]; then - echo "Using local @metamask/auto-changelog from github-tools node_modules" - node ./github-tools/node_modules/@metamask/auto-changelog/dist/cli.mjs update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink \ - || { echo "Local auto-changelog failed; falling back to GitHub branch"; npx --yes github:MetaMask/auto-changelog#parse-changelog-entry-adjustments update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink; } - else - echo "Local @metamask/auto-changelog not found; falling back to GitHub branch" - npx --yes github:MetaMask/auto-changelog#parse-changelog-entry-adjustments update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink - fi + npx --no-install @metamask/auto-changelog update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink # Skip commits.csv for hotfix releases (previous_version_ref is literal "null") # - When we create a new major/minor release, we fetch all commits included in the release, by fetching the diff between HEAD and previous version reference. @@ -366,7 +359,7 @@ create_changelog_pr() { ls -ltra corepack prepare yarn@4.5.1 --activate # This can't be done from the actions context layer due to the upstream repository having it's own context set with yarn - yarn install + yarn --cwd install echo "Generating test plan csv.." yarn run gen:commits "${platform}" "${DIFF_BASE}" "${release_branch_name}" "${PROJECT_GIT_DIR}" From dccf2d3c0c0c80bb38a82bc5dbf7f1cab48fbab6 Mon Sep 17 00:00:00 2001 From: Pavel Dvorkin Date: Wed, 10 Sep 2025 15:30:48 -0400 Subject: [PATCH 08/10] Test changelog automation https://github.com/MetaMask/auto-changelog/pull/247 --- .github/scripts/create-platform-release-pr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/create-platform-release-pr.sh b/.github/scripts/create-platform-release-pr.sh index fcf46a87..bfe70e01 100755 --- a/.github/scripts/create-platform-release-pr.sh +++ b/.github/scripts/create-platform-release-pr.sh @@ -319,7 +319,7 @@ create_changelog_pr() { # Generate Changelog and Test Plan echo "Generating changelog via auto-changelog.." - npx --no-install @metamask/auto-changelog update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink + npx @metamask/auto-changelog update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink # Skip commits.csv for hotfix releases (previous_version_ref is literal "null") # - When we create a new major/minor release, we fetch all commits included in the release, by fetching the diff between HEAD and previous version reference. From 4b4916c02c6d29df78b76603bc99de444364af84 Mon Sep 17 00:00:00 2001 From: Pavel Dvorkin Date: Thu, 11 Sep 2025 09:44:47 -0400 Subject: [PATCH 09/10] Test changelog automation https://github.com/MetaMask/auto-changelog/pull/247 --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 14ea54d7..930cd291 100644 --- a/yarn.lock +++ b/yarn.lock @@ -943,7 +943,7 @@ __metadata: "@metamask/auto-changelog@github:MetaMask/auto-changelog#parse-changelog-entry-adjustments": version: 5.0.2 - resolution: "@metamask/auto-changelog@https://github.com/MetaMask/auto-changelog.git#commit=3298e5259680fc2d3a917ec7f05268be9ad7a4cd" + resolution: "@metamask/auto-changelog@https://github.com/MetaMask/auto-changelog.git#commit=0b8e0cb3c89b855e18b1961b0965a733dd4b70a7" dependencies: "@octokit/rest": "npm:^20.0.0" diff: "npm:^5.0.0" @@ -953,8 +953,8 @@ __metadata: peerDependencies: prettier: ">=3.0.0" bin: - auto-changelog: dist/cli.mjs - checksum: 10/df2e1604626f415b2bda6ed5bafc35fecb2b5e0834bfcfb2328f387a351372ac996ed64f3f8ad6eb4a817a8bb1186d3030cba20e6fe2f6a602284c0bc9082652 + auto-changelog: dist/cli.js + checksum: 10/3c28df861768f81367474f8516790143690fc46d2e52a6cc5459747a616f345bfc92c2937b5c73381eea92dfda86c00ce82c81093f953539f22a88c1c3c6518e languageName: node linkType: hard From edf3aadda98ea69f027e2e39975b6c380cb57d05 Mon Sep 17 00:00:00 2001 From: Pavel Dvorkin Date: Thu, 11 Sep 2025 10:02:01 -0400 Subject: [PATCH 10/10] Test changelog automation https://github.com/MetaMask/auto-changelog/pull/247 --- .github/scripts/create-platform-release-pr.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/scripts/create-platform-release-pr.sh b/.github/scripts/create-platform-release-pr.sh index bfe70e01..1b61ad5b 100755 --- a/.github/scripts/create-platform-release-pr.sh +++ b/.github/scripts/create-platform-release-pr.sh @@ -319,7 +319,16 @@ create_changelog_pr() { # Generate Changelog and Test Plan echo "Generating changelog via auto-changelog.." - npx @metamask/auto-changelog update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink + if [ -f "./node_modules/@metamask/auto-changelog/dist/cli.mjs" ]; then + echo "Using invoking repo's local @metamask/auto-changelog" + node ./node_modules/@metamask/auto-changelog/dist/cli.mjs update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink + elif [ -f "./github-tools/node_modules/@metamask/auto-changelog/dist/cli.mjs" ]; then + echo "Using github-tools local @metamask/auto-changelog" + node ./github-tools/node_modules/@metamask/auto-changelog/dist/cli.mjs update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink + else + echo "Local auto-changelog not found; using GitHub branch" + npx --yes github:MetaMask/auto-changelog#parse-changelog-entry-adjustments update --rc --repo "${GITHUB_REPOSITORY_URL}" --currentVersion "${new_version}" --autoCategorize --useChangelogEntry --useShortPrLink + fi # Skip commits.csv for hotfix releases (previous_version_ref is literal "null") # - When we create a new major/minor release, we fetch all commits included in the release, by fetching the diff between HEAD and previous version reference. @@ -359,7 +368,7 @@ create_changelog_pr() { ls -ltra corepack prepare yarn@4.5.1 --activate # This can't be done from the actions context layer due to the upstream repository having it's own context set with yarn - yarn --cwd install + yarn install echo "Generating test plan csv.." yarn run gen:commits "${platform}" "${DIFF_BASE}" "${release_branch_name}" "${PROJECT_GIT_DIR}"