Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Test changelog automation MetaMask/auto-changelog#247
  • Loading branch information
XxdpavelxX committed Sep 11, 2025
commit edf3aadda98ea69f027e2e39975b6c380cb57d05
13 changes: 11 additions & 2 deletions .github/scripts/create-platform-release-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -359,7 +368,7 @@ create_changelog_pr() {
ls -ltra
corepack prepare [email protected] --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}"
Expand Down
Loading