gitea-issues asserted flatly that a merge never closes an issue, contradicting gitea-prs' references/merging.md, which documents that closing keywords in commits landing on the default branch do close one. The qualifier that made the claim true had been deleted; both sides now agree. gitea-releases had lost an epistemic hedge and its verification step, leaving conventions.md asserting unconfirmed tag auto-creation as fact. Nothing in the research corpus sources it, so the hedge and the verify-afterward instruction are back rather than upgraded. Descriptions were cut 50-240 chars under the 400 budget and shed routing with them: gitea-workflow's boundary named no target, gitea-prs lost the issue/PR number-space directive the suite is built around at 163/400, gitea-releases lost its boundary and every trigger. Restored, inside budget. Also restores delete_branch's hard-refusal strength and gitea-files' Read/Write/Edit pointer. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EJJrm5YmacbwMdzZpXcoti
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.0"
|
|
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
|
|
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`.
|