-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
chore: INFRA-2925:Adding github action to merge stable to main on comment #23118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
| github.event.issue.pull_request && | ||
| github.event.comment.body == 'Merge my PR' && | ||
| ( | ||
| github.event.comment.author_association == 'COLLABORATOR' || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want collaborators to be able to merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed so if the PR is approved by a release team member, but if not then let me remove that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the collaborator is anyone who can write to the repo. Should we constrain this to a specific team like Release Team?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed collaborator.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThis PR adds a new GitHub Actions workflow file (.github/workflows/merge-approved-pr.yml) that provides a convenience feature for merging approved PRs via a comment command. Key observations:
Impact Assessment:
Risk Level: Low - This is a documentation/infrastructure-only change with no impact on the application or its testing. Recommendation: No E2E tests are necessary for this change. The workflow itself can be validated through GitHub Actions execution, but it doesn't require functional testing of the MetaMask Mobile application. |
|
Gudahtt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
sethkfman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM



Description
Allows you to merge stable-main-X.Y.Z -> base main PRs on comment "Merge my PR"
Successful Negative tests:
Not Merging on Incorrect comment: consensys-test#55, https://github.com/consensys-test/metamask-mobile-test-workflow/actions/runs/19683528967
Not Merging from wrong source branch: consensys-test#53, https://github.com/consensys-test/metamask-mobile-test-workflow/actions/runs/19575100357/job/56058172525
Not Merging into wrong target branch: consensys-test#54, https://github.com/consensys-test/metamask-mobile-test-workflow/actions/runs/19575460777/job/56059417843
Not Merging on unapproved PR: consensys-test#55, https://github.com/consensys-test/metamask-mobile-test-workflow/actions/runs/19709760888
Not Merging on approver not in Release Team: consensys-test#55, https://github.com/consensys-test/metamask-mobile-test-workflow/actions/runs/19709971385
Desired Successful test: consensys-test#55, https://github.com/consensys-test/metamask-mobile-test-workflow/actions/runs/19710071272/job/56467981022
Changelog
CHANGELOG entry: None
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Add GitHub Actions workflow to auto-merge PRs on exact "Merge my PR" comment from MEMBER/OWNER using reusable workflow.
/.github/workflows/merge-approved-pr.yml:issue_comment(created) for PRs.Merge my PRand commenter isMEMBERorOWNER.MetaMask/github-tools/.github/workflows/merge-approved-pr.yml@30baa9d....pr-numberfrom event and usesMETAMASK_MOBILE_BRANCH_SYNC_TOKENasgithub-token.Written by Cursor Bugbot for commit e56215b. This will update automatically on new commits. Configure here.