Add delete_issue tool #21
Labels
No labels
status/paused
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jbr870/forgejo-mcp-server#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 a
delete_issuetool that wrapsDELETE /repos/{owner}/{repo}/issues/{index}.Background
The Forgejo API exposes an
issueDeleteendpoint (visible in the swagger at/api/swagger/#/issue/issueDelete), but the MCP server does not currently wrap it. Today the only way to remove a test issue ischange_issue_state(state="closed"), which leaves the issue in the repo's history.This came up while writing the regression test prompt: each run leaves a closed test issue (and its comment) behind, so after N runs the repo has N closed test issues. Not blocking — closure works fine for the regression to be re-runnable, since closed issues don't conflict — but a real
delete_issuewould let the test suite be properly idempotent.Proposed signature
Return shape:
{"result": {"deleted": true, "issue_index": N}}on success,{"error": "..."}on failure (consistent with the rest of the server).Caveats / docstring guidance
Issue deletion is destructive and irreversible. For normal workflows,
change_issue_state(state="closed")is almost always the right primitive — GitHub, by comparison, doesn't expose delete-issue at all, for this reason. The docstring should make this clear so agents don't reach fordelete_issuewhen they mean "close".Primary use cases:
Related
delete_commenttool #22