Skip to content
Open
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
11 changes: 10 additions & 1 deletion .github/scripts/create-platform-release-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,23 @@ create_changelog_pr() {
# Need to run from .github-tools context to inherit it's dependencies/environment
echo "Current Directory: $(pwd)"
PROJECT_GIT_DIR=$(pwd)

# Resolve previous_version when it's a branch name: fetch and use origin/<branch>
DIFF_BASE="${previous_version}"
if git ls-remote --heads origin "${previous_version}" | grep -qE "\srefs/heads/${previous_version}$"; then
echo "Detected remote branch for previous version: ${previous_version}"
git fetch origin "${previous_version}"
DIFF_BASE="origin/${previous_version}"
fi

cd ./github-tools/
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

echo "Generating test plan csv.."
yarn run gen:commits "${platform}" "${previous_version}" "${release_branch_name}" "${PROJECT_GIT_DIR}"
yarn run gen:commits "${platform}" "${DIFF_BASE}" "${release_branch_name}" "${PROJECT_GIT_DIR}"

if [[ "${TEST_ONLY:-false}" == 'false' ]]; then
echo "Updating release sheet.."
Expand Down
10 changes: 5 additions & 5 deletions .github/scripts/generate-rc-commits.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const octokit = new Octokit({ auth: githubToken });
async function getTeam(repository, prNumber) {
try {
const { data: prData } = await octokit.pulls.get({
owner: 'MetaMask',
owner: 'consensys-test',
Copy link

Choose a reason for hiding this comment

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

Bug: Inconsistent PR Data and Team Assignments

The script was updated to use consensys-test for fetching PR data and generating PR links, but the teams.json URL still points to MetaMask. This creates an inconsistency where PRs are pulled from a test organization, but team data is sourced from the production MetaMask-planning repo, leading to incorrect team assignments.

Additional Locations (1)

Fix in Cursor Fix in Web

repo: repository,
pull_number: prNumber[1],
});
Expand Down Expand Up @@ -46,7 +46,7 @@ async function getTeam(repository, prNumber) {
// Step 3: Match the PR author's username to a team
const team = teamsJson[author];

// Step 4: Return the team name or 'Unknown' if not found
// Step 4: Return the team name or 'Unknown' if not found.
return team || 'Unknown';

} catch (error) {
Expand All @@ -71,7 +71,7 @@ async function filterCommitsByTeam(platform, branchA, branchB) {
repository = 'metamask-mobile';
break;
case 'extension':
repository = 'metamask-extension';
repository = 'metamask-extension-test-workflow2';
break;
default:
repository = 'metamask-mobile';
Expand Down Expand Up @@ -107,10 +107,10 @@ async function filterCommitsByTeam(platform, branchA, branchB) {
}

// Extract PR number from the commit message using regex
const prMatch = message.match(/\(#(\d{4,5})\)$/u);
const prMatch = message.match(/\(#(\d{1,5})\)$/u);
if (prMatch) {
const prLink = prMatch
? `https://github.com/MetaMask/${repository}/pull/${prMatch[1]}`
? `https://github.com/consensys-test/${repository}/pull/${prMatch[1]}`
: '';
const team = await getTeam(repository, prMatch);

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ on:
required: false
type: string
description: 'The Google Document ID for the release notes.'
default: '1tsoodlAlyvEUpkkcNcbZ4PM9HuC9cEM80RZeoVv5OCQ' # Prod Release Document
default: '1rWSCoU07QxaP-H1Wkw-GNtwVNdeunDOjZoHoLXYxwkw' # Prod Release Document
platform:
required: true
type: string
Expand Down
Loading