Commit b540ee6
authored
ci: Skip merge queue if pull request is up-to-date (#3786)
This adds a new action which determines whether a pull request in the
merge queue is up-to-date, meaning:
- The pull request is based on the latest commit on `main`.
- The pull request is the first in the merge queue.
In this case, all status checks have already passed on the branch, and
running in the merge queue would be redundant, meaning we can skip the
merge queue checks.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds a job to detect up-to-date PRs in merge groups and conditionally
skip subsequent checks, adjusting dependencies and final pass gating
accordingly.
>
> - **CI Workflow (`.github/workflows/main.yml`)**
> - **New job**: `check-skip-merge-queue` to detect up-to-date PRs
during `merge_group` using
`MetaMask/github-tools/.../check-skip-merge-queue@v1`.
> - **Conditional execution**: `check-workflows` now `needs:
check-skip-merge-queue` and is skipped in `merge_group` when
`skip-merge-queue` is `true`.
> - **Final gating**: `all-jobs-pass` now depends on both
`all-jobs-complete` and `check-skip-merge-queue`, passing if either all
jobs passed or `skip-merge-queue` is `true`.
> - Minor wiring: checkout only during `merge_group` for the new job;
propagate `skip-merge-queue` via job outputs.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
390987f. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 3624460 commit b540ee6
1 file changed
+23
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
15 | 30 | | |
16 | 31 | | |
17 | 32 | | |
| 33 | + | |
| 34 | + | |
18 | 35 | | |
19 | 36 | | |
20 | 37 | | |
| |||
126 | 143 | | |
127 | 144 | | |
128 | 145 | | |
129 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
130 | 149 | | |
131 | 150 | | |
| 151 | + | |
| 152 | + | |
132 | 153 | | |
133 | | - | |
134 | | - | |
| 154 | + | |
135 | 155 | | |
136 | 156 | | |
0 commit comments