feat(repo): add branch-protection set (create-or-update upsert) #400
No reviewers
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea!400
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-375-branch-protection-command"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add a
set <branch>verb to the branch-protection command family on both surfaces: CLImadtea repo protect setand MCPmadt_branches_remote protect_set. list/get/create/update/delete already existed; only the create-or-update upsert was missing. set probes the existing rule and creates it when absent or updates it when present.Also fixes a latent idempotency bug: the branch-protection by-name client paths concatenated the rule name raw, so a slash-bearing pattern rule (release/*) never matched the single-segment route and set always re-created it. The get/update/delete paths now url.PathEscape the name (a no-op for plain names).
Note for review: this raises the aggregate tool-schema byte budget 230000 -> 240000. The new protect_set action tips the measured total to 230094, and the old cap's headroom was exhausted by prior additions; the measurement comments are refreshed.
Follow-ups filed: #397 (live-forge probe for pattern-rule idempotency), #398 (whether set should fully define final rule state - a semantics decision).
Gate green including mcp-conformance and parity.
Closes #375