2.5 KiB
2.5 KiB
name, description
| name | description |
|---|---|
| issue | Create a Gitea issue in the project's canonical format. Run when the user asks to file/create an issue, or types /tea:issue. Ensures exclusive type/* labels exist, composes the body from the type's template, and posts via tea api. Format lives in the use skill's references. |
/tea:issue — create an issue in the canonical format
Thin procedure on top of the canonical format defined in
../use/references/issue-format.md.
Read that file first — it is the single source of truth for types, labels,
templates, and language rules. Login rules are the same as everywhere:
always --login "$GITEA_LOGIN", never a literal name (see /tea:use).
Steps
- Read the format: load
../use/references/issue-format.md. - Pick the type —
bug,feature,refactor, ordraft(for ideas not ready for work). If it is not obvious from the request, ask the user (one question). - Ensure labels exist:
tea labels list --login "$GITEA_LOGIN" -o json. For each missingtype/*label, create it viatea apiwith"exclusive": trueexactly as shown in the format doc. Do NOT usetea labels createfor these — it cannot set exclusivity. - Compose title and body per the format: English imperative title without
a type prefix; the type's template with all sections present, in order,
headers in English, prose in Russian;
## Specfilled with a repo path, a URL, or the literalnone— ask the user if you cannot determine which. - Post via tmp/ + tea api (the body is always multi-line, so entity
commands are off the table — see "Rich payloads" in
/tea:use):The create endpoint takes label IDs (integers), not names — take them from themkdir -p tmp/issue # write {"title": "...", "body": "...", "labels": [<type-label-id>]} as JSON tea api --login "$GITEA_LOGIN" -X POST -d @tmp/issue/<slug>.json \ repos/{owner}/{repo}/issuestea labels listoutput of step 3 (or from the create response). If labels fail to attach on create, fall back toPUT repos/{owner}/{repo}/issues/{n}/labelswith{"labels": [<id>]}. - Report: show the issue URL and the applied
type/*label.
Editing an existing issue
When asked to bring an existing issue to the format: fetch it
(tea issues <n> --login "$GITEA_LOGIN" -o json), restructure the body into
the type's template without losing information, then
PATCH repos/{owner}/{repo}/issues/{n} with the new title/body and ensure
exactly one type/* label is set.