Skip to content

Commit d96795b

Browse files
committed
branchs and branches-ignore filters are available for merge_group event
1 parent 0a2b221 commit d96795b

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

docs/checks.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,14 +1276,14 @@ actionlint validates the Webhook configurations:
12761276
- Some filters are only available for specific events as explained in [the official document][specific-paths-doc]
12771277
(see the following table).
12781278

1279-
| Filter name | Events where the filter is available |
1280-
|-------------------|-----------------------------------------------|
1281-
| `paths` | `push`, `pull_request`, `pull_request_target` |
1282-
| `paths-ignore` | `push`, `pull_request`, `pull_request_target` |
1283-
| `branches` | `push`, `pull_request`, `pull_request_target` |
1284-
| `branches-ignore` | `push`, `pull_request`, `pull_request_target` |
1285-
| `tags` | `push` |
1286-
| `tags-ignore` | `push` |
1279+
| Filter name | Events where the filter is available |
1280+
|-------------------|--------------------------------------------------------------|
1281+
| `paths` | `push`, `pull_request`, `pull_request_target` |
1282+
| `paths-ignore` | `push`, `pull_request`, `pull_request_target` |
1283+
| `branches` | `merge_group`, `push`, `pull_request`, `pull_request_target` |
1284+
| `branches-ignore` | `merge_group`, `push`, `pull_request`, `pull_request_target` |
1285+
| `tags` | `push` |
1286+
| `tags-ignore` | `push` |
12871287

12881288
The table of available Webhooks and their types are defined in [`all_webhooks.go`](../all_webhooks.go). It is generated
12891289
by [a script][generate-webhook-events] and kept to the latest by CI workflow triggered weekly.

rule_events.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ func (rule *RuleEvents) checkWebhookEvent(event *WebhookEvent) {
132132
}
133133

134134
// Some filters are available with specific events and exclusive
135+
// - on.merge_group.<branches|branches-ignore>
135136
// - on.<push|pull_request|pull_request_target>.<paths|paths-ignore>
136137
// - on.push.<branches|tags|branches-ignore|tags-ignore>
137138
// - on.<pull_request|pull_request_target>.<branches|branches-ignore>
@@ -146,7 +147,7 @@ func (rule *RuleEvents) checkWebhookEvent(event *WebhookEvent) {
146147
event.Branches,
147148
event.BranchesIgnore,
148149
hook,
149-
[]string{"push", "pull_request", "pull_request_target", "workflow_run"},
150+
[]string{"merge_group", "push", "pull_request", "pull_request_target", "workflow_run"},
150151
)
151152
rule.checkExclusiveFilters(
152153
event.Tags,

0 commit comments

Comments
 (0)