You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6503c45
Browse filesBrowse the repository at this point in the historyBrowse files
fix(sections): the live-duplicate guard covers every snapshot; a repeated rule type is a settings-file error; addressed names and one plural in the guard
Copilot and gate review folds: the guard runs before every bespoke snapshot's projection (repo secrets and variables, custom properties, secret scanning patterns, collaborators and invitations, environments' nested lists); rulesets name a repeated rule type before the read instead of a BUG crash and refuse a live body repeating one; the guard names a live item with its address; plural() spells the nouns; collaborators and teams role drift and nested mapping mismatches render declared-first; webhook writes never carry name.
Copy file name to clipboardExpand all lines: docs/upgrading/v2-to-v3.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,8 +165,9 @@ Anything that greps the check output for these lines needs the new spelling:
165
165
## 13. Webhooks manage web hooks only
166
166
167
167
- A legacy service hook (`name` other than `web`) or a hook without a `config.url` is outside the section: plan neither matches, notes, nor deletes it (v2 deleted one under `_undeclared: delete`); snapshot leaves it out with a note.
168
-
- The create body carries `name` only when the file declares it; GitHub defaults a new hook to `web`.
168
+
- No write carries `name`: GitHub defaults a new hook to `web`, the one value the slice admits, and the update endpoint takes no name.
169
169
- A declared `insecure_ssl: 0` is written as GitHub stores it, the string `"0"`.
170
+
- A snapshot writes a hook's `config` keys in the order GitHub lists them, the `$SECRET_WEBHOOK_<id>` reference last.
170
171
171
172
## 14. A ruleset without `source_type` is repository-owned
`${section.key}: GitHub holds ${noun}s that resolve to one identity: ${collisions.join("; ")}. This section manages one ${noun} per identity, so it cannot tell them apart; delete all but one of each on GitHub, then run again`,
33
+
`${section.key}: GitHub holds ${plural(noun)} that resolve to one identity: ${collisions.join("; ")}. This section manages one ${noun} per identity, so it cannot tell them apart; delete all but one of each on GitHub, then run again`,
'deploy_keys: GitHub holds deploy keys that resolve to one identity: "deploy-bot" and "deploy-bot". This section manages one deploy key per identity, so it cannot tell them apart; delete all but one of each on GitHub, then run again',
110
+
'deploy_keys: GitHub holds deploy keys that resolve to one identity: "deploy-bot (key id 11)" and "deploy-bot (key id 12)". This section manages one deploy key per identity, so it cannot tell them apart; delete all but one of each on GitHub, then run again',
`rulesets: GitHub returned the ruleset "${live.name}" (id ${live.id}) with the rule type${repeated.length===1 ? "" : "s"}${repeated.map((type)=>`"${type}"`).join(", ")} more than once, so its rules cannot be paired by type; delete the repeated rule on GitHub, then re-run`,
80
+
);
81
+
}
82
+
returnlive;
83
+
}
57
84
58
85
// Rules pass through verbatim, so a typo'd rules[].type reaches GitHub unchanged and comes back as
59
86
// a 422; the valid types live in the endpoint docs, not here, so they cannot go stale.
`the ruleset "${write.name}" lists the rule type${repeated.length===1 ? "" : "s"}${repeated.map((type)=>`"${type}"`).join(", ")} more than once, and GitHub keeps one rule per type - declare each type once`,
143
+
];
144
+
}),
145
+
},
107
146
// Only a ruleset the API marks repository-owned is this section's; an inherited one is managed where it is defined.
'rulesets: the settings file declares conflicting rulesets: the ruleset "main" lists the rule type "deletion" more than once, and GitHub keeps one rule per type - declare each type once. Fix the settings file, then re-run',
'rulesets: GitHub returned the ruleset "main" (id 9) with the rule type "deletion" more than once, so its rules cannot be paired by type; delete the repeated rule on GitHub, then re-run',
420
+
);
421
+
expect(api.mutations()).toEqual([]);
422
+
});
423
+
398
424
test("wrapped _undeclared:delete plans the DELETE after the declared upserts",async()=>{
'rulesets: GitHub holds rulesets that resolve to one identity: "main" and "main". This section manages one ruleset per identity, so it cannot tell them apart; delete all but one of each on GitHub, then run again',
654
+
'rulesets: GitHub holds rulesets that resolve to one identity: "main (ruleset id 1)" and "main (ruleset id 2)". This section manages one ruleset per identity, so it cannot tell them apart; delete all but one of each on GitHub, then run again',
0 commit comments