Skip to content

Commit dbba32e

Browse files
committed
docs(ci): scope required-check runbook to main only
The frontend-build.yml trigger for feat/multicloud-web-frontend was removed when that branch merged into main (commit 4f7d429). The Build frontend check therefore only fires on main-targeting PRs, so branch protection instructions for the retired branch are misleading. Removes the feat/multicloud-web-frontend commands from all four admin steps and the required-checks list; updates the Context section to explain why main is the only active target.
1 parent 2f06848 commit dbba32e

1 file changed

Lines changed: 8 additions & 29 deletions

File tree

‎docs/ci-required-checks.md‎

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ touching `frontend/**`. The workflow shipped, but the corresponding
1212
required-checks list. A PR that breaks the frontend build can currently be
1313
merged without a block (issue #377).
1414

15+
The workflow targets the `main` branch only. The `feat/multicloud-web-frontend`
16+
trigger was removed in the commit that merged that branch into `main`
17+
(`4f7d429a8`), so `Build frontend` only ever runs for PRs targeting `main`.
18+
1519
> **Note on context naming**: GitHub branch-protection contexts are derived
1620
> from the **job `name:`** field, not the workflow `name:` field. The workflow
1721
> is named `Frontend build (PR)` but its single job is named `Build frontend`,
@@ -20,7 +24,7 @@ merged without a block (issue #377).
2024
2125
## Required checks -- canonical list
2226

23-
Both `feat/multicloud-web-frontend` and `main` should require:
27+
`main` should require:
2428

2529
- `Build frontend`
2630
- Any other checks already present at the time an admin applies this runbook
@@ -30,29 +34,21 @@ Both `feat/multicloud-web-frontend` and `main` should require:
3034

3135
These commands require repo-admin permission on LeanerCloud/CUDly.
3236

33-
### Step 1 -- retrieve the current required checks for each branch
37+
### Step 1 -- retrieve the current required checks for main
3438

3539
```bash
36-
gh api repos/LeanerCloud/CUDly/branches/feat/multicloud-web-frontend/protection \
37-
--jq '.required_status_checks.contexts'
38-
3940
gh api repos/LeanerCloud/CUDly/branches/main/protection \
4041
--jq '.required_status_checks.contexts'
4142
```
4243

43-
If either returns `"Branch not protected"` (HTTP 404), the protection rule
44+
If this returns `"Branch not protected"` (HTTP 404), the protection rule
4445
must be created from scratch; use the `gh api -X PUT` form in Step 3.
4546

4647
### Step 2 -- add the check to an already-protected branch
4748

4849
Replace `EXISTING_CHECK_1` etc. with the contexts returned by Step 1:
4950

5051
```bash
51-
gh api -X PATCH \
52-
repos/LeanerCloud/CUDly/branches/feat/multicloud-web-frontend/protection/required_status_checks \
53-
-F 'contexts[]=EXISTING_CHECK_1' \
54-
-F 'contexts[]=Build frontend'
55-
5652
gh api -X PATCH \
5753
repos/LeanerCloud/CUDly/branches/main/protection/required_status_checks \
5854
-F 'contexts[]=EXISTING_CHECK_1' \
@@ -64,20 +60,6 @@ gh api -X PATCH \
6460
Adjust `required_pull_request_reviews` and `enforce_admins` to taste:
6561

6662
```bash
67-
gh api -X PUT \
68-
repos/LeanerCloud/CUDly/branches/feat/multicloud-web-frontend/protection \
69-
--input - <<'EOF'
70-
{
71-
"required_status_checks": {
72-
"strict": true,
73-
"contexts": ["Build frontend"]
74-
},
75-
"enforce_admins": false,
76-
"required_pull_request_reviews": null,
77-
"restrictions": null
78-
}
79-
EOF
80-
8163
gh api -X PUT \
8264
repos/LeanerCloud/CUDly/branches/main/protection \
8365
--input - <<'EOF'
@@ -96,14 +78,11 @@ EOF
9678
### Step 4 -- verify
9779

9880
```bash
99-
gh api repos/LeanerCloud/CUDly/branches/feat/multicloud-web-frontend/protection \
100-
--jq '.required_status_checks.contexts'
101-
10281
gh api repos/LeanerCloud/CUDly/branches/main/protection \
10382
--jq '.required_status_checks.contexts'
10483
```
10584

106-
Both should include `"Build frontend"`.
85+
The output should include `"Build frontend"`.
10786

10887
### Step 5 -- smoke test
10988

0 commit comments

Comments
 (0)