forgejo-mcp/operation
Christoph Görn 0826172c23
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.
2026-06-02 16:22:24 +02:00
..
actions feat: robust stateless auth with security fixes and improved tests 2026-05-24 13:44:48 +02:00
attachment feat: add issue & comment attachment tools (#109) 2026-05-02 12:06:54 +02:00
branchprotection feat: ✨ branch protection management — CRUD tools + forgejo:// resources (uc6) 2026-06-02 16:22:24 +02:00
issue fix: 🐛 request EmbeddedListCap+1 issue comments to detect truncation 2026-05-28 16:15:24 +02:00
org feat: robust stateless auth with security fixes and improved tests 2026-05-24 13:44:48 +02:00
params feat: ✨ branch protection management — CRUD tools + forgejo:// resources (uc6) 2026-06-02 16:22:24 +02:00
pull fix: 🐛 request EmbeddedListCap+1 PR reviews to detect truncation 2026-05-28 16:18:20 +02:00
release feat: robust stateless auth with security fixes and improved tests 2026-05-24 13:44:48 +02:00
repo fix: 🐛 request EmbeddedListCap+1 statuses to detect truncation 2026-05-28 16:13:45 +02:00
resource feat: ✨ branch protection management — CRUD tools + forgejo:// resources (uc6) 2026-06-02 16:22:24 +02:00
search feat: robust stateless auth with security fixes and improved tests 2026-05-24 13:44:48 +02:00
tracking feat: robust stateless auth with security fixes and improved tests 2026-05-24 13:44:48 +02:00
user fix: 🐛 owner resource: surface orgErr on transport failure, explicit -32003 on both-404 2026-05-28 16:11:26 +02:00
version fix: add /v2 suffix to module path for go install compatibility 2025-12-29 15:51:03 +01:00
wiki feat: robust stateless auth with security fixes and improved tests 2026-05-24 13:44:48 +02:00
extracttoken_test.go fix: 🔒️ reject bare tokens in stateless HTTP auth 2026-06-01 23:41:10 +02:00
operation.go feat: ✨ branch protection management — CRUD tools + forgejo:// resources (uc6) 2026-06-02 16:22:24 +02:00