The #113 sweep rested on CLAUDE.md's premise that rtk either filters or passes through unchanged, so prefixing is always safe. Measured against rtk 0.42.4, that premise is false for several of the commands the sweep prefixed, and two skills were left giving wrong answers silently. Why: - `rtk git worktree list --porcelain -z` discards both flags and renders its own format. The `locked`/`lock_reason` fields git-worktrees Step 2 must emit are absent entirely, and paths under $HOME are abbreviated to `~/`. - `rtk git branch --list <name>` prints a phantom `* ` line even when nothing matches, so git-branches' stated ambiguity test — "output from both means the name is ambiguous" — reported every name as ambiguous. `tag --list` is a clean passthrough, so only one half broke. - `rtk git diff --name-only`/`--name-status` append a `Changes:` trailer to output documented as "one per line"; `--word-diff` emits none of the `[-removed-] {+added+}` markers its table describes; `rtk git log -L` truncates each line at ~72 chars, on the one command whose purpose is showing line content. - `rtk git stash pop` prints only `FAILED: git stash pop`, swallowing the conflict diagnostic and retained-entry message the surrounding prose tells the agent to rely on. Implementation notes: - Eleven sites reverted to bare `git`, each carrying its reason inline so the next sweep does not undo it. `mergetool` and `rebase -i` are reverted on clause 3's interactive limb only: the TTY defect does not reproduce — rtk filters exactly twelve subcommands and execs the rest — and ADR-0023 records that measurement rather than a convenient one. - ADR-0023 states the rule repo-wide with a third clause: a command whose output the skill parses, or which is interactive, stays bare. `plugins/git/README.md` is reduced to a pointer; its claim that gitea skills "contain no git/rtk mentions at all" was false, and its citation of `hard-rules.md` pointed at a file containing no occurrence of "rtk". - Eight gitea sites swept, all verified byte-identical passthroughs first. - `scripts/check-rtk-prefix.sh` gates clause 1. Run against main's pre-sweep corpus it reports 99 findings including every gitea site, so it would have caught the drift #113 was filed about. Impact: the gate covers clause 1 only, in shell-tagged fences and the opening span of Run cells. Clause 2 is not gateable — "Run `git switch`" and "`git switch` refuses" are the same tokens — and prose bullets are invisible to it. Both limits are recorded in gates.md rather than left implied. Refs: #113 ADR: 0023 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EeH8SCbcrCAQrtymkNuhKP
74 lines
4.9 KiB
Markdown
74 lines
4.9 KiB
Markdown
---
|
|
name: gitea-releases
|
|
|
|
description: >
|
|
Use when managing Gitea releases or the git tags underneath them — list, get, create, or
|
|
delete either — even when the user does not say "release" or "Gitea": "cut a v1.2.0",
|
|
"publish a prerelease", "tag this commit", "what's the latest release". Not branches or
|
|
commit history -> `gitea-branches`. Not issues -> `gitea-issues`. Not pull requests ->
|
|
`gitea-prs`.
|
|
|
|
compatibility: Requires Gitea MCP server configured with a token with write:repository scope, which
|
|
gates every release and tag tool here. Requires git remote "origin" pointing to the Gitea instance
|
|
for owner/repo resolution, unless an orchestrating caller passes them already resolved.
|
|
|
|
metadata:
|
|
category: integration
|
|
version: "0.1.1"
|
|
source_keys:
|
|
- gitea-mcp-repo
|
|
- gitea-mcp-slim-go
|
|
- context7-websites-gitea
|
|
- context7-gitea-tea-cli
|
|
|
|
allowed-tools: Bash mcp__gitea__list_releases mcp__gitea__get_release mcp__gitea__get_latest_release mcp__gitea__create_release mcp__gitea__delete_release mcp__gitea__list_tags mcp__gitea__get_tag mcp__gitea__create_tag mcp__gitea__delete_tag
|
|
---
|
|
|
|
## Gotchas
|
|
|
|
- **`delete_release` takes the numeric `id`, never a `tag_name`; `delete_tag` takes the tag name, never an id.** Holding only a tag name, resolve the release id through `list_releases` or `get_release` first — a tag name passed to `delete_release` fails, and that failure is not evidence the release is already gone.
|
|
- **Deleting a release never deletes its tag**, and the reverse direction is *unconfirmed* — verify with `list_releases`/`get_release` after `delete_tag`. Removing both takes two independent destructive calls.
|
|
- **Set `is_draft`/`is_pre_release` explicitly on every `create_release`** — Gitea infers neither from a `-beta`/`-rc` tag name, so `v2.0.0-beta.1` publishes as a full release and becomes the repo's latest. `draft`/`prerelease` are output field names only; passing `draft` as an input key is silently ignored.
|
|
- **`list_releases`/`list_tags` default `per_page` to 20**, where most other gitea-mcp list tools default to 30 — a caller assuming 30 under-counts pages.
|
|
|
|
## Step 1 — Resolve owner and repo
|
|
|
|
`owner` and `repo` are required on every tool below. Extract them from the git remote, unless an orchestrating caller passed them in already:
|
|
|
|
```bash
|
|
rtk git remote get-url origin
|
|
```
|
|
|
|
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
|
|
|
|
| Action | Tool | Required params | Optional params |
|
|
|---|---|---|---|
|
|
| List releases | `list_releases` | `owner`, `repo` | `is_draft`, `is_pre_release`, `page` (default 1), `per_page` (default 20) |
|
|
| Get one release | `get_release` | `owner`, `repo`, `id` (number) | — |
|
|
| Get latest release | `get_latest_release` | `owner`, `repo` | — |
|
|
| Create release | `create_release` | `owner`, `repo`, `tag_name`, `target`, `title` | `body`, `is_draft`, `is_pre_release` |
|
|
| Delete release | `delete_release` | `owner`, `repo`, `id` (number) | — |
|
|
| List tags | `list_tags` | `owner`, `repo` | `page` (default 1), `per_page` (default 20) |
|
|
| Get one tag | `get_tag` | `owner`, `repo`, `tag_name` | — |
|
|
| Create tag | `create_tag` | `owner`, `repo`, `tag_name` | `target`, `message` |
|
|
| Delete tag | `delete_tag` | `owner`, `repo`, `tag_name` | — |
|
|
|
|
`target` (on `create_release`/`create_tag`) is a commitish — a branch name, existing tag, or commit SHA — the point the new tag is cut from.
|
|
|
|
Pass a caller-supplied `tag_name` through verbatim — the API accepts any string; semver is convention, not constraint.
|
|
|
|
## Step 3 — Procedure for the scenario in hand
|
|
|
|
These four are mutually exclusive — pick the one row the request lands on.
|
|
|
|
| Scenario | Procedure |
|
|
|---|---|
|
|
| Create a release | Call `create_release` with `tag_name`, `target`, `title`, and `is_draft`/`is_pre_release` set explicitly — never left to default. This surface carries no update or edit tool, so a wrong flag is repairable only by delete-and-recreate (`references/conventions.md`). A separate `create_tag` is only needed to tag a commit without wrapping it in a release — whether `create_release` creates a missing tag is unconfirmed, so verify with `get_tag`. |
|
|
| Delete a release | Resolve the numeric `id` per the first Gotcha, confirm intent, then call `delete_release`. The tag survives. |
|
|
| Delete a tag along with its release | Delete the release first, then call `delete_tag` — confirm both are intended before proceeding, since each is irreversible on its own. |
|
|
| List every page | Loop `page: 1, 2, 3...` until a response returns fewer than `per_page` entries. Nothing here auto-paginates. |
|
|
|
|
If exact input params or response field shapes are needed, read `references/call-signatures.md`. If the caller raises semver tag naming, draft/prerelease semantics, release-notes sourcing, or how a release relates to its tag, read `references/conventions.md`.
|