Commit

Docs: merge_group in the merge queue and Actions guides

syntaqxcommitted Parented0cae1Browse files
2 files+18−30/2 viewed
+4−1
2929
3030 | On GitHub | On g1t |
3131 | --- | --- |
32−| `on:` `push` (branches, tags, paths), `pull_request`, `pull_request_target`, `issues`, `issue_comment`, `pull_request_review`, `schedule`, `workflow_dispatch`, `workflow_run` | The same, from g1t's own pushes, pull requests, issues and comments. |
32+| `on:` `push` (branches, tags, paths), `pull_request`, `pull_request_target`, `issues`, `issue_comment`, `pull_request_review`, `schedule`, `workflow_dispatch`, `workflow_run`, `merge_group` | The same, from g1t's own pushes, pull requests, issues, comments and [merge queue](/guides/merge-queue/). |
3333 | `jobs`, `needs`, `if`, `outputs`, `env`, `defaults`, `timeout-minutes`, `continue-on-error` | The same. |
3434 | `strategy.matrix` with `include` and `exclude`, `fail-fast`, `max-parallel`, a matrix from `fromJSON(needs.…)` | The same. |
3535 | `concurrency` with `cancel-in-progress` | The same. |
9494 - While a workflow runs, the pull request waits for it before merging.
9595 - When one fails, merging is refused, as for failed acceptance checks.
9696 Where the repository allows ignoring checks, a member can merge anyway.
97+- In a repository that merges through the [merge queue](/guides/merge-queue/),
98+ workflows with `on: merge_group` run on each combined state the queue
99+ builds, as on GitHub, and the state lands only if they pass.
97100 - A pull request a **g1t agent** is working on goes back to the agent
98101 when a workflow fails. The agent reads the run and its logs with the
99102 same tools you have, fixes the cause, and pushes; the workflows run
+14−2
7575 So a change that breaks something that landed before it is caught here,
7676 even when it merges without a conflict and its own checks pass.
7777
78+Once those pass, the repository's [GitHub Actions](/guides/actions/)
79+workflows that run `on: merge_group` run on the state too, with the same
80+`merge_group` event GitHub sends, on the branch `g1t-queue/<entry>`. The
81+entry waits for them, and lands only if they pass:
82+
83+```yaml
84+on:
85+ pull_request:
86+ merge_group:
87+```
88+
7889 A contract check that fails is run again on `main` alone. If it fails there
7990 too, it was broken already: it is marked as passing with a note, "already
8091 failing on the default branch; not held against this", and does not hold
96107
97108 ## When an entry fails
98109
99−An entry fails when its checks fail in the combined state, when it does not
100−merge cleanly with what is ahead of it, or when the state cannot be built.
110+An entry fails when its checks or its `merge_group` workflows fail in the
111+combined state, when it does not merge cleanly with what is ahead of it, or
112+when the state cannot be built.
101113 It leaves the queue, and:
102114
103115 1. Its pull request gets a failed check run. Each command is named with the