coily ops forgejo: add issue create verb so agents can file forgejo issues without curl+SSM #69

Closed
opened 2026-05-25 00:06:23 +00:00 by coilysiren · 0 comments
Owner

Problem

coily ops forgejo currently exposes only admin and doctor subtrees (coily/cmd/coily/ops_forgejo.go). When an agent needs to file an issue on a coilysiren/* repo, GH issues are disabled everywhere, and forgejo is the canonical tracker per AGENTS.md "Default TODO Destination," but there's no coily surface for it. Today's workaround is:

  1. coily ops aws ssm get-parameter --name /forgejo/api-token --with-decryption ...
  2. Write the issue body as a file (because shell-metacharacter policy blocks heredocs).
  3. curl -X POST https://forgejo.coilysiren.me/api/v1/repos/<owner>/<repo>/issues -H "Authorization: token ..." -d @file
  4. Parse the JSON response by hand.

That's ~4 steps and a token leak risk per issue, repeated every time. "Wastes a lot of time" per the conversation that spawned this ticket.

Fix

Add coily ops forgejo issue create --repo <owner/repo> --title <t> --body-file <path> (and the obvious siblings: list, view, comment). Internally:

  • Read the API token from /forgejo/api-token via the existing SSM client (already wired for other coily verbs).
  • POST to https://forgejo.coilysiren.me/api/v1/repos/<owner>/<repo>/issues.
  • Audit row stamps repo + title + returned issue number.
  • Mirror coily ops gh issue create's flag shape so muscle memory transfers.

Why

Closes the surface gap so the "file the issue first, then commit" workflow in AGENTS.md actually works for forgejo-only repos (i.e. almost all coilysiren/*). Meta-improvement bias: bug surfaced during a normal task, fix the system that produced it.

Context

Filed the parent ticket (coilysiren/cli-guard#11) via the curl+SSM dance described above, which is itself the symptom this issue exists to fix.

**Problem** `coily ops forgejo` currently exposes only `admin` and `doctor` subtrees (`coily/cmd/coily/ops_forgejo.go`). When an agent needs to file an issue on a `coilysiren/*` repo, GH issues are disabled everywhere, and forgejo is the canonical tracker per AGENTS.md "Default TODO Destination," but there's no coily surface for it. Today's workaround is: 1. `coily ops aws ssm get-parameter --name /forgejo/api-token --with-decryption ...` 2. Write the issue body as a file (because shell-metacharacter policy blocks heredocs). 3. `curl -X POST https://forgejo.coilysiren.me/api/v1/repos/<owner>/<repo>/issues -H "Authorization: token ..." -d @file` 4. Parse the JSON response by hand. That's ~4 steps and a token leak risk per issue, repeated every time. "Wastes a lot of time" per the conversation that spawned this ticket. **Fix** Add `coily ops forgejo issue create --repo <owner/repo> --title <t> --body-file <path>` (and the obvious siblings: `list`, `view`, `comment`). Internally: - Read the API token from `/forgejo/api-token` via the existing SSM client (already wired for other coily verbs). - POST to `https://forgejo.coilysiren.me/api/v1/repos/<owner>/<repo>/issues`. - Audit row stamps `repo` + `title` + returned issue number. - Mirror `coily ops gh issue create`'s flag shape so muscle memory transfers. **Why** Closes the surface gap so the "file the issue first, then commit" workflow in AGENTS.md actually works for forgejo-only repos (i.e. almost all `coilysiren/*`). Meta-improvement bias: bug surfaced during a normal task, fix the system that produced it. **Context** Filed the parent ticket (coilysiren/cli-guard#11) via the curl+SSM dance described above, which is itself the symptom this issue exists to fix.
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-bridge/coily#69
No description provided.