Skip to content

Commit f3aaade

Browse files
authored
build: Trigger presubmit workflows on GitHub merge queue events (googleapis#12685)
Googlers see approved doc in b/300959810 See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#merge_group which mentions the following: >More than one activity type triggers this event. Although only the checks_requested activity type is supported, specifying the activity type will keep your workflow specific if more activity types are added in the future. >If your repository uses GitHub Actions to perform required checks on pull requests in your repository, you need to update the workflows to include the merge_group event as an additional trigger. Otherwise, status checks will not be triggered when you add a pull request to a merge queue. The merge will fail as the required status check will not be reported. The merge_group event is separate from the pull_request and push events.
1 parent d9a3f90 commit f3aaade

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

.github/workflows/docs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ on:
22
pull_request:
33
branches:
44
- main
5+
# Trigger workflow on GitHub merge queue events
6+
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#merge_group
7+
merge_group:
8+
types: [checks_requested]
59
name: docs
610

711
permissions:

.github/workflows/lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ on:
22
pull_request:
33
branches:
44
- main
5+
# Trigger workflow on GitHub merge queue events
6+
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#merge_group
7+
merge_group:
8+
types: [checks_requested]
59
name: lint
610

711
permissions:

.github/workflows/unittest.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ on:
22
pull_request:
33
branches:
44
- main
5+
# Trigger workflow on GitHub merge queue events
6+
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#merge_group
7+
merge_group:
8+
types: [checks_requested]
59
name: unittest
610

711
permissions:

0 commit comments

Comments
 (0)