Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/scripts/create-platform-release-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,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
yarn 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.
Expand Down Expand Up @@ -372,7 +372,7 @@ create_changelog_pr() {

# Use helper functions for push and PR creation
push_branch_with_handling "${changelog_branch_name}"
create_pr_if_not_exists "${changelog_branch_name}" "chore: ${changelog_branch_name}" "${pr_body}" "${release_branch_name}" "" "search"
create_pr_if_not_exists "${changelog_branch_name}" "release: ${changelog_branch_name}" "${pr_body}" "${release_branch_name}" "" "search"

echo "Changelog PR Ready"
}
Expand Down Expand Up @@ -492,7 +492,7 @@ main() {
# Initialize branch names
local release_branch_name changelog_branch_name version_bump_branch_name
release_branch_name=$(get_release_branch_name "$NEW_VERSION")
changelog_branch_name="chore/${NEW_VERSION}-Changelog"
changelog_branch_name="release/${NEW_VERSION}-Changelog"
version_bump_branch_name=$(get_version_bump_branch_name "$next_version") # Execute main workflow
configure_git

Expand Down Expand Up @@ -521,7 +521,7 @@ main() {
echo "Created PRs:"
echo "1. Release PR: release: ${NEW_VERSION}"
if [ "$TEST_ONLY" != "true" ]; then
echo "2. Changelog PR: chore: ${changelog_branch_name}"
echo "2. Changelog PR: release: ${changelog_branch_name}"
if [[ "${PREVIOUS_VERSION_REF,,}" == "null" ]]; then
echo "(Hotfix) Skipped version bump PR"
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ configure_git

echo ""
echo "Testing create_release_pr:"
create_release_pr "extension" "1.5.3" "100" "Version-v1.5.3" "chore/1.5.3-Changelog"
create_release_pr "extension" "1.5.3" "100" "Version-v1.5.3" "release/1.5.3-Changelog"

echo ""
echo "Testing create_version_bump_pr:"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stable-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
run: |
# Create PR using GitHub CLI
gh pr create \
--title "chore: sync stable to main for version $VERSION" \
--title "release: sync stable to main for version $VERSION" \
--body "This PR syncs the stable branch to main for version $VERSION.

*Synchronization Process:*
Expand All @@ -156,7 +156,7 @@ jobs:
- android/app/build.gradle
- ios/MetaMask.xcodeproj/project.pbxproj
- package.json

Indicates the next version candidate of main to $VERSION" \
--base main \
--head "$BRANCH_NAME"
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"update-release-sheet": "node .github/scripts/update-release-sheet.mjs"
},
"dependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@metamask/auto-changelog": "^5.1.0",
"@metamask/utils": "^7.1.0",
"@octokit/graphql": "^7.0.1",
"@octokit/request": "^8.1.1",
Expand Down Expand Up @@ -56,17 +56,17 @@
"@typescript-eslint/parser": "^5.43.0",
"depcheck": "^1.4.3",
"eslint": "^8.44.0",
"eslint-config-prettier": "^8.8.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.2",
"eslint-plugin-jsdoc": "^39.9.1",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.5.4",
"eslint-plugin-promise": "^6.1.1",
"jest": "^28.1.3",
"jest-it-up": "^2.0.2",
"prettier": "^2.7.1",
"prettier-plugin-packagejson": "^2.3.0",
"prettier": "^3.6.2",
"prettier-plugin-packagejson": "^2.5.19",
"ts-jest": "^28.0.7",
"ts-node": "^10.9.1",
"typescript": "^5.1.3"
Expand Down
2 changes: 1 addition & 1 deletion src/changelog-check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ async function checkChangelogFile({
if (
!Object.values(changelogChanges)
.flat()
.some((entry) => entry.includes(`[#${prNumber}]`))
.some((entry) => entry.prNumbers.includes(prNumber))
Copy link

Choose a reason for hiding this comment

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

Bug: Changelog PR Number Type Mismatch

The updated changelog check entry.prNumbers.includes(prNumber) introduces two issues. prNumber comes in as a string from command line arguments, but entry.prNumbers likely contains numbers, causing includes() to always fail due to type mismatch. Also, if entry.prNumbers is missing or not an array, calling .includes() will result in a runtime TypeError.

Fix in Cursor Fix in Web

) {
throw new Error(
`There are changes made to this package that may not be reflected in the changelog ("${changelogPath}"). If the changes you've introduced are user-facing, please document them under the "${releaseSection}" section, making sure to link the entries to the current PR. If the changelog is up to date, you can bypass this check by adding the 'no-changelog' label to the PR.`,
Expand Down
Loading
Loading