feat: ✨ branch protection management — CRUD tools + forgejo:// resources (uc6)
Implements the branch-protection OpenSpec change (#195). New
operation/branchprotection/ package:
- Tools: list/get/create/edit/delete_branch_protection over
/repos/{owner}/{repo}/branch_protections.
- list_branch_protections is output-bounded (page/limit; echoes page/limit
for resumability).
- create/edit round-trip status_check_contexts (comma-separated). edit uses
PATCH pointer semantics (pkg/ptr.To): only caller-passed fields change;
unpassed fields serialize as null (leave-unchanged), never false.
- Resources: bounded collection forgejo://repo/{o}/{r}/branch_protections
(EmbeddedListCap sentinel -> list_branch_protections) and single
forgejo://repo/{o}/{r}/branch_protection/{rule} (rule may contain slashes).
- ParseBranchProtection(s) added to operation/resource; wired into
operation.go + cmd/cli.go domain grouping; README tool table updated.
- httptest coverage: list, get (ok/404), create (contexts round-trip;
missing branch_name -> no call), edit (only-passed-fields null-safety;
contexts), delete; parser + truncation + error-mapping tests.
Refines the edit scenario in the change spec to match SDK marshaling
(null = leave-unchanged). tasks.md complete.
Closes forgejo-mcp-uc6.