feat: repo_update tool (archive, description, visibility, template flag) #12
Reference in New Issue
Block a user
Delete Branch "%!s()"
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
repo_updatetool to modify repository metadata — most importantly thearchivedflag to mark repos as read-only without deleting them.Gitea API
PATCH /api/v1/repos/{owner}/{repo}Tool spec
Required token permission
write:repositoryscope on the Gitea API token.Risk classification
MEDIUM — reversible (can unarchive), but visibility changes are significant.
private: falseshould trigger ntfy confirmation.Implementation notes
private: false(making public) should warn in tool descriptionMotivation
ingestion-svcneeded archiving — had to do README tombstone insteadtemplate-go-agentandtemplate-go-webhavetemplate: false— should betruehyperguild new-projectwill need to set description + template flag on newly created reposReview finding — missing fields (2026-05-14)
Code review of
internal/tools/repo_update.goagainst the original spec revealed two gaps:Gap 1 —
archivedandtemplatefields missing (HIGH)The original issue spec required:
Current implementation only handles:
description,private,website,default_branch.Impact:
ingestion-svc(workaround: manual web UI)template: trueontemplate-go-webandtemplate-go-agent(blocks create_project_from_template working correctly)hyperguild new-projectflowFix needed in
internal/gitea/repos.go→UpdateRepoArgsstruct:And in
internal/tools/repo_update.goinput schema +repoUpdateArgsstruct:Gap 2 — confirm guard missing for
archived=true(LOW)The confirm guard currently only protects
private=false(making a repo public).Archiving (
archived=true) is effectively irreversible in practice and should requirethe same confirm pattern:
Acceptance criteria additions
archivedfield added toUpdateRepoArgs, tool schema, and args structtemplatefield added toUpdateRepoArgs, tool schema, and args structarchived=truerequiresconfirm=<repo name>