Files
go-cuckoo/AGENTS.md
T
mvhutz 3bc9d63b93
CI / Check PR Title (pull_request) Successful in 43s
CI / Makefile Lint (pull_request) Successful in 1m15s
CI / Go Lint (pull_request) Successful in 1m25s
CI / Markdown Lint (pull_request) Successful in 1m5s
CI / Unit Tests (pull_request) Successful in 1m15s
CI / Fuzz Tests (pull_request) Successful in 1m47s
CI / Mutation Tests (pull_request) Successful in 1m50s
docs: add link to branch with previous work
2026-07-04 19:46:36 -04:00

1.7 KiB

AGENTS.md

Git hosting: this is Gitea, not GitHub

go-cuckoo is hosted on a self-hosted Gitea instance, not GitHub. gh will not work against it — use the tea CLI instead.

  • Remote: git@git.maximhutz.com:tools/go-cuckoo.git
  • Repo slug for tea: tools/go-cuckoo
  • PR URLs look like https://git.maximhutz.com/tools/go-cuckoo/pulls/<N> (path is pulls, matching tea's pulls command — not pull).

Inspecting a PR

Get metadata as JSON:

tea pulls --repo tools/go-cuckoo -o json \
  -f "index,title,state,author,base,head,body,labels" <PR#>

Non-interactive sessions print a one-line NOTE: no gitea login detected, falling back to login '<name>' on stderr before the JSON — expected, not an error.

Useful fields from the JSON: base / head (branch names), headSha, diffUrl (<pr-url>.diff, fetchable without auth via plain curl/WebFetch for a public repo).

-f diff and -f patch are listed in tea pulls --help but are silently dropped from JSON output — verified empirically, don't rely on them. To get the actual diff:

git fetch origin <base>
git diff origin/<base>...HEAD    # only valid if local HEAD == PR's headSha

Check local HEAD against the PR's headSha first (git rev-parse HEAD) — if they differ, the checkout isn't the PR branch and this diff is wrong. Otherwise fall back to fetching diffUrl directly.

Other tea subcommands that exist

tea pulls list|checkout|create|review|approve|reject|merge|review-comments, plus top-level tea issues, tea releases, tea labels. Run tea <noun> --help before assuming GitHub-shaped flags carry over — Gitea's CLI has its own field names and defaults (e.g. --state defaults to open).