gitea-files' always-loaded Gotchas said "content is base64 both ways" without qualification. The `main` text carried an exception for `withLines: true` and both halves were dropped. Verified live: `get_file_contents` with `withLines: true` returns plain JSON text while the same response still reports `"encoding":"base64"`. An agent that follows the recommendation two sentences later and applies the unconditional decode gets garbage, with the response's own field confirming the wrong answer. Exception restored, and the lying field named. gitea-orchestrate was never updated for `rename_branch`: absent from the operation enum, so an agent caller got "unknown operation", and absent from the destructive-confirm list, though branches.md requires a rename with open PRs or a protection rule to be confirmed exactly as `delete_branch` is. Added to both — the confirm gate rather than the enum alone, because accepting the operation without it routes around a rule the skill states while appearing to support it. The compatibility frontmatter, which the agent reads, still omitted the tool too. Two more always-loaded Gotchas contradicted their own reference files, and the Gotcha was wrong both times: issues and PRs are distinguishable on a list item by the `html_url` path segment (confirmed live — #129 at /pulls/, #128 at /issues/), and `get_repository_tree` takes `tree_sha`, not `ref`. `review_comments` was asserted as unconditionally present on the PR get response. It is absent on a PR with no review comments, so the claim is downgraded to present-when-non-zero rather than stated as response shape. The label-exclusivity relocation moved the rule out of label-inference.md and into labels.md without updating sources.md, leaving the one rule in this branch that writes differently to live repos citing a file that no longer carries it. The rule itself is correct as it stands and `main` was wrong — every Kind/* label on this instance is exclusive:false, every Priority/* and Status/* is true — so only the provenance record is corrected. Routing: gitea-workflow lost the human-caller discriminator and widened from status checks to any request, which sent "close #42" to a branch that resolves the number and presents detail without ever closing it. gitea-branches and gitea-issues regain trigger phrasings the retrofit dropped. Refs: #92
3.2 KiB
name, description, compatibility, metadata, allowed-tools
| name | description | compatibility | metadata | allowed-tools | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| gitea-branches | Use when listing, creating, renaming, or deleting branches in a Gitea repository, or reading its commit history — "what commits are on this branch", "what changed in that commit" — even when the user does not say "Gitea". Not a local checkout's branches -> `git-branches`. Not local history -> `git-history`. Not a PR's head or base -> `gitea-prs`. | Requires Gitea MCP server configured with a token with write:repository scope; this is confirmed to gate list_branches, create_branch, and delete_branch (Gitea gates reads behind write scope for repo-scoped operations), and is inferred by analogy (not explicitly confirmed by source docs) to also gate rename_branch, list_commits, and get_commit. Requires git remote "origin" pointing to the Gitea instance. |
|
Bash mcp__gitea__list_branches mcp__gitea__create_branch mcp__gitea__rename_branch mcp__gitea__delete_branch mcp__gitea__list_commits mcp__gitea__get_commit |
Gotchas
- 404 often means 403. Gitea masks permission errors as not-found; on an unexpected one, check token scope before reporting a branch or commit missing.
- Nothing auto-paginates.
list_branchesandlist_commitsreturn one page; iteratepageuntil the returned count is belowper_page. delete_branchhas no force-push guard. Treat deleting a protected branch as a hard refusal unless the user explicitly confirms it in the conversation. Checkprotectedfromlist_branchesfirst — a protected branch need not be namedmain.
Step 1 — Resolve owner and repo
Before any tool call, extract owner and repo from the git remote:
git remote get-url origin
get_me and list_my_repos are blocked under the token scope this skill assumes, so the remote is the only source. If origin is not set or the URL is not a Gitea URL, stop and report: "No Gitea remote found — set origin to your Gitea instance URL."
Step 2 — Dispatch
| Invocation | Action |
|---|---|
/gitea-branches or /gitea-branches list |
List branches |
/gitea-branches create <name> [from <base>] |
Create branch |
/gitea-branches rename <name> to <new-name> |
Rename branch |
/gitea-branches delete <name> |
Delete branch |
/gitea-branches commits [on <branch>] [touching <path>] |
List commit history |
/gitea-branches commit <sha> |
Get full detail for one commit |
For branch operations (list/create/rename/delete), read references/branches.md — it carries the call signatures, the old_branch source rule, and the protected-branch refusal in full.
For commit operations (list/get), read references/commits.md.
Step 3 — Report
For reads: display branches as name + protected flag; display commits as SHA (short), message summary, author, date.
For writes (create/rename/delete): confirm the action taken, the branch name, and (for create) the base it forked from or (for rename) the name it had before.
For errors: surface the HTTP code and message, applying the 404 gotcha above before reporting "not found" to the user.