feat(tools): repo_create, repo_update, repo_mirror_push (#12, #13, #16) #21

Merged
mathias merged 2 commits from feat/repo-crud into main 2026-05-15 08:21:23 +00:00
Owner

What

Batch 1 of the v0.2 sprint — three tools needed for the hyperguild new-project automated project creation flow.

Tools added

Tool Gitea API Issue
repo_create POST /user/repos or /orgs/{org}/repos #13
repo_update PATCH /repos/{owner}/{repo} #12
repo_mirror_push POST/GET/DELETE /repos/{owner}/{repo}/push_mirrors #16

Design decisions

  • repo_create uses is_org: true to route to the org endpoint — avoids a round-trip to detect user vs org
  • repo_update requires confirm == repo_name when setting private: false (making public is destructive)
  • repo_mirror_push uses an action param (add/list/delete) — three operations, one tool; remote_password is never returned in any response

Tests

All table-driven with httptest.NewServer mocks, following existing pattern. task check passes (lint + race test + vet + govulncheck).

## What Batch 1 of the v0.2 sprint — three tools needed for the `hyperguild new-project` automated project creation flow. ### Tools added | Tool | Gitea API | Issue | |------|-----------|-------| | `repo_create` | `POST /user/repos` or `/orgs/{org}/repos` | #13 | | `repo_update` | `PATCH /repos/{owner}/{repo}` | #12 | | `repo_mirror_push` | `POST/GET/DELETE /repos/{owner}/{repo}/push_mirrors` | #16 | ### Design decisions - `repo_create` uses `is_org: true` to route to the org endpoint — avoids a round-trip to detect user vs org - `repo_update` requires `confirm == repo_name` when setting `private: false` (making public is destructive) - `repo_mirror_push` uses an `action` param (`add`/`list`/`delete`) — three operations, one tool; `remote_password` is never returned in any response ## Tests All table-driven with `httptest.NewServer` mocks, following existing pattern. `task check` passes (lint + race test + vet + govulncheck).
mathias added 2 commits 2026-05-15 08:21:09 +00:00
feat(tools): add repo_create, repo_update, repo_mirror_push (#12, #13, #16)
All checks were successful
CD / Lint / Test / Vet (pull_request) Successful in 7s
CD / Build & Import (pull_request) Has been skipped
CD / Deploy via GitOps (pull_request) Has been skipped
e2da495581
repo_create: POST /user/repos or /orgs/{org}/repos, is_org flag routes
repo_update: PATCH /repos/{owner}/{repo}, confirm required when private=false
repo_mirror_push: add/list/delete push mirrors, password never returned
mathias merged commit 2c94de7b59 into main 2026-05-15 08:21:23 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mathias/gitea-mcp#21