Skip to content

Commit 1e1a0c1

Browse files
authored
chore: INFRA-3000: Merge Version Bump PRs with comment (#38486)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Merge Verion Bump PRs to main on "merge my PR" comment. https://consensyssoftware.atlassian.net/browse/INFRA-3000 Testing: Stable Sync PR: consensys-test/metamask-mobile-test-workflow#57, https://github.com/consensys-test/metamask-mobile-test-workflow/actions/runs/19863362645/job/56919203621 Version Bump PR: consensys-test/metamask-mobile-test-workflow#58, https://github.com/consensys-test/metamask-mobile-test-workflow/actions/runs/19868119714 [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/38486?quickstart=1) ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds GitHub Actions to auto-merge version-bump PRs and updates stable-sync workflow to target main with specific branch patterns on "Merge my PR" comment. > > - **CI/Workflows**: > - `merge-stable-sync-pr.yml`: > - Rename workflow and update reusable workflow ref. > - Enforce `required-base-branch: main` and `head-branch-pattern: ^stable-main-[0-9]+\.[0-9]+\.[0-9]+$`. > - `merge-version-bump-pr.yml` (new): > - Auto-merge `version-bump/X.Y.Z` PRs into `main` on comment using the reusable workflow. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 234ee45. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 88b054c commit 1e1a0c1

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

.github/workflows/merge-approved-pr.yml renamed to .github/workflows/merge-stable-sync-pr.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Merge Approved PR
1+
name: Merge Stable Sync PR
22

33
on:
44
# Trigger the workflow when a comment is created on an issue or pull request
@@ -15,8 +15,11 @@ jobs:
1515
github.event.comment.author_association == 'MEMBER' ||
1616
github.event.comment.author_association == 'OWNER'
1717
)
18-
uses: MetaMask/github-tools/.github/workflows/merge-approved-pr.yml@30baa9da0b80d94dd8bdf0b6a932c46506664857
18+
uses: MetaMask/github-tools/.github/workflows/merge-approved-pr.yml@7c0ab4db1e9c1d5673fe7958e8959f1842edbebd
1919
with:
2020
pr-number: ${{ github.event.issue.number }}
21+
# Merge PRs from stable-main-X.Y.Z into main
22+
required-base-branch: 'main'
23+
head-branch-pattern: '^stable-main-[0-9]+\.[0-9]+\.[0-9]+$'
2124
secrets:
2225
github-token: ${{ secrets.METAMASK_EXTENSION_BRANCH_SYNC_TOKEN }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Merge Version Bump PR
2+
3+
on:
4+
# Trigger the workflow when a comment is created on an issue or pull request
5+
issue_comment:
6+
types: [created]
7+
8+
jobs:
9+
merge-pr:
10+
# Only run if the comment is on a PR and the comment body matches exactly "Merge my PR"
11+
if: >-
12+
github.event.issue.pull_request &&
13+
github.event.comment.body == 'Merge my PR' &&
14+
(
15+
github.event.comment.author_association == 'MEMBER' ||
16+
github.event.comment.author_association == 'OWNER'
17+
)
18+
uses: MetaMask/github-tools/.github/workflows/merge-approved-pr.yml@7c0ab4db1e9c1d5673fe7958e8959f1842edbebd
19+
with:
20+
pr-number: ${{ github.event.issue.number }}
21+
# Merge PRs from version-bump/X.Y.Z into main
22+
required-base-branch: 'main'
23+
head-branch-pattern: '^version-bump/[0-9]+\.[0-9]+\.[0-9]+$'
24+
secrets:
25+
github-token: ${{ secrets.METAMASK_EXTENSION_BRANCH_SYNC_TOKEN }}

0 commit comments

Comments
 (0)