feat: add issue create and comment (task 0004)
All checks were successful
CI / test (pull_request) Successful in 24s
CI / test (push) Successful in 28s

Introduce the first mutations, along with the shared machinery the later
issue and PR mutation slices reuse.

- `issue create` with --title/--body/--body-file/--assignee/--label/
  --milestone/--fields, emitting `issue: { number, title, state, url }`
- `issue comment <n>`, echoing the created comment from the POST response
  with the body cleaned and truncated at 800 chars
- body-source resolution (--body vs --body-file), label and milestone
  name->ID lookup, repeatable flags, and the `joined`/`selectExtraFields`
  field extractors

Label lookup pages until exhausted, since a repo with more labels than one
page would otherwise fail to resolve a valid name. The end-to-end tier seeds
a mixed-case label and milestone and passes both in a different case, so the
case-insensitive lookup is verified against live Gitea rather than only
against fixtures.
This commit was merged in pull request #3.
This commit is contained in:
2026-07-11 20:39:01 -04:00
parent 5e66b4d746
commit f82414a933
13 changed files with 1328 additions and 41 deletions

View File

@@ -12,8 +12,10 @@ const DESCRIPTION = "Agent-ergonomic CLI for Gitea issues and pull requests";
const TOP_LEVEL_HELP = `usage: gitea-axi <command> [flags]
commands:
issue list List issues in the current repository
issue view Show a single issue's details
issue list List issues in the current repository
issue view Show a single issue's details
issue create Create an issue
issue comment Post a comment on an issue or pull request
global flags:
-R, --repo <OWNER/NAME> Override the repository detected from the git origin remote