feat: issue_close and issue_reopen tools #30
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
issue_closeandissue_reopentools to allow agents to change issue state programmatically — closing completed issues and reopening them if needed.Gitea API
PATCH /api/v1/repos/{owner}/{repo}/issues/{index}Body:
{"state": "closed"}or{"state": "open"}Tool spec
Returns
Required token permission
write:issuescope on the Gitea API token.Risk classification
issue_close: LOW — reversible via issue_reopen.issue_reopen: LOW — reversible.Implementation notes
issue_set_statetool with astateenum param instead of two tools — cleaner API, same implementation costissue_get.gofor struct and Call() layoutMotivation
Discovered 2026-05-14: after completing infra issue #26 (ntfy via NPM), could not
close it programmatically from claude.ai. Had to leave it open or close manually
in web UI. Agents should be able to close issues as part of task completion flow —
e.g. after merging a PR that resolves an issue.
Related
issue_get(#20) — read state before changing it