Skip to content

fix: accept GitHub tag update rules without branch parameters - #40

Merged
abrichr merged 1 commit into
mainfrom
codex/tag-update-rule-representation-20260909
Sep 9, 2026
Merged

fix: accept GitHub tag update rules without branch parameters#40
abrichr merged 1 commit into
mainfrom
codex/tag-update-rule-representation-20260909

Conversation

@abrichr

@abrichr abrichr commented Sep 9, 2026

Copy link
Copy Markdown
Member

GitHub returns a tag update restriction as {"type":"update"}, even when the request supplies update_allows_fetch_and_merge:false. The current validator rejects that readback, which prevents an otherwise protected release from reaching admission.

Accept the two exact tag-rule encodings: the bare update rule and the existing explicit Boolean-false form. GitHub documents the parameter as an optional branch setting. Neither form grants an update bypass. The creation App identity, active tag scope, deletion and non-fast-forward restrictions, and empty immutability bypass list remain required. Unknown fields and non-Boolean false values still fail.

The admission adapter compares the retained rule to the current API response without adding a missing field. The staging digest therefore continues to bind the observed bytes. This change doesn't alter old signed objects or make an existing GitHub release immutable.

Validation: 38 focused test methods pass, including 55 new positive and negative subcases. Independent review also checked the real ruleset readbacks through the runtime validator and JSON Schema. The retained rule bytes and their digest remain unchanged. Required PR CI passed. The unchanged issuer also fetched current control metadata and both artifact files from GitHub and PyPI. It accepted the raw bare-update staging, then refused a changed retained-rule representation against the live response.

References: GitHub REST rule definitions and Restrict updates.

Signed-off-by: abrichr <richard.abrich@mldsai.com>
@abrichr
abrichr merged commit 0a386a5 into main Sep 9, 2026
3 checks passed
@abrichr
abrichr deleted the codex/tag-update-rule-representation-20260909 branch September 9, 2026 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant