Commit c8a957c
fix(backtrack): unblock Merges API when enforce_admins + PR reviews are active (#191)
The backtrack workflow's automated `POST /repos/.../merges` calls were
blocked by branch protection: `enforce_admins: true` combined with
`required_pull_request_reviews` rejects the Merges API even for admin
tokens — there's no bypass.
## Changes
**`lock/action.yml`** — adds `skip-pull-request-reviews` input. When
`true`, sends `required_pull_request_reviews: null` in the PUT payload
instead of the review config object:
```yaml
"required_pull_request_reviews": (if $skip_reviews then null else {
"dismiss_stale_reviews": $dismiss_stale,
"require_code_owner_reviews": false,
"required_approving_review_count": $review_count
} end)
```
**`backtrack.yml`** — the two "unlock for merge" steps (preview and
develop branches) now pass `skip-pull-request-reviews: 'true'`. The
existing `always()`-guarded restore steps re-apply full PR review
requirements after each merge regardless of outcome.
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>1 parent 9caa7cc commit c8a957c
2 files changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| 50 | + | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
49 | | - | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
53 | | - | |
| 58 | + | |
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
0 commit comments