Skip to content

feat(stable-sync): Move stable sync process within github tools#82

Merged
alucardzom merged 8 commits into
mainfrom
ale/improve-stable-sync-process
Jul 8, 2025
Merged

feat(stable-sync): Move stable sync process within github tools#82
alucardzom merged 8 commits into
mainfrom
ale/improve-stable-sync-process

Conversation

@alucardzom
Copy link
Copy Markdown
Contributor

This PR consolidates duplicate script functionality from the Mobile and Extension repositories into our centralized GitHub tools repository. Instead of maintaining separate copies of similar scripts in each platform repository, both teams now reference a single, shared implementation via reusable workflows.

Key improvements

  • Eliminates code duplication between Mobile and Extension platforms
  • Provides a single source of truth for shared script logic
  • Reduces maintenance overhead while maintaining existing functionality
  • Follows our established pattern of centralizing common tooling

This change preserves all current processes and workflows while creating a more maintainable foundation for future updates.

See: https://github.com/MetaMask/MetaMask-planning/issues/4210

cursor[bot]

This comment was marked as outdated.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Bug: Incorrect Version Retrieval in Yarn Script

The extension-specific logic for yarn version incorrectly retrieves the package.json from origin/${baseBranch} instead of origin/main. This causes the script to apply an outdated version from the baseBranch (e.g., 'stable') instead of the latest version from main, which is necessary for a proper main-to-stable sync.

.github/scripts/stable-sync.js#L104-L107

const { stdout: packageJsonContent } = await exec(
`git show origin/${baseBranch}:package.json`,
);

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎


const { stdout: packageJsonContent } = await exec(
'git show origin/main:package.json',
`git show origin/${baseBranch}:package.json`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this also be stable instead of main?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah that's why I've updated it and tested it again, to use the correct stable branch which is passed as an argument. Mobile uses the stable branch, extension uses master (once they align the branch naming, will be a matter of updating the GH Workflow input).

Thanks!!

@alucardzom alucardzom merged commit 86272c8 into main Jul 8, 2025
19 checks passed
@alucardzom alucardzom deleted the ale/improve-stable-sync-process branch July 8, 2025 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants