mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 07:50:19 +00:00
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:
@@ -2,6 +2,8 @@ name: 🧪 CI
|
||||
|
||||
on:
|
||||
merge_group:
|
||||
types:
|
||||
- checks_requested
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user