Merge group (#1691)

## Description:

Attempt to support merge_group

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [ ] I have read and accepted the CLA agreement (only required once).
This commit is contained in:
Scott Anderson
2025-08-02 21:16:45 -04:00
committed by GitHub
parent 42dcaa5413
commit 662ba11ff1
2 changed files with 21 additions and 6 deletions
+2
View File
@@ -2,6 +2,8 @@ name: 🧪 CI
on:
merge_group:
types:
- checks_requested
pull_request:
push:
branches: [main]
+19 -6
View File
@@ -2,6 +2,8 @@ name: 🧼 PR
on:
merge_group:
types:
- checks_requested
pull_request:
types:
- demilestoned
@@ -21,6 +23,11 @@ jobs:
- uses: actions/github-script@v7
with:
script: |
if (context.eventName === 'merge_group') {
// Ignore merge_group events
return;
}
const body = context.payload.pull_request.body || '';
const errors = [];
@@ -61,10 +68,16 @@ jobs:
- uses: actions/github-script@v7
with:
script: |
// Get the pull request data
const milestone = context.payload.pull_request.milestone;
if (!milestone) {
core.setFailed('❌ Pull request must have a milestone assigned before merging.');
return;
if (context.eventName === 'merge_group') {
// Ignore merge_group events
} else if (context.eventName === 'pull_request') {
// Get the pull request data
const milestone = context.payload.pull_request.milestone;
if (!milestone) {
core.setFailed('❌ Pull request must have a milestone assigned before merging.');
return;
}
console.log(`✅ Milestone found: ${milestone.title}`);
} else {
core.setFailed(`❌ Unknown event type ${context.eventName}.`);
}
console.log(`✅ Milestone found: ${milestone.title}`);