closes-issue hook: assert a Forgejo issue specifically #117

Closed
opened 2026-05-31 03:34:43 +00:00 by coilysiren · 1 comment
Owner

🤖 Filed by Claude Code on Kai's behalf.

The closes-issue commit-msg hook (agentic_os/check_commit_closes_issue.py) only pattern-matched a closing keyword. It accepted the owner/repo#N shorthand, which is the GitHub idiom and platform-ambiguous, so a commit could "close" a GitHub-style ref while the canonical tracker is Forgejo.

Tighten the checker to assert a Forgejo issue specifically (regex-only, no network):

  • Accept only bare #N (auto-links to this repo's Forgejo issue) or a full forgejo.coilysiren.me/<owner>/<repo>/issues/N URL.
  • Reject the owner/repo#N shorthand and non-Forgejo refs (e.g. GitHub issue URLs).
  • Key same-repo identity off the forgejo remote, falling back to origin.
  • Add a pytest suite plus a coily test verb to run it.

🤖 Filed by Claude Code on Kai's behalf.

> 🤖 Filed by Claude Code on Kai's behalf. The `closes-issue` commit-msg hook (`agentic_os/check_commit_closes_issue.py`) only pattern-matched a closing keyword. It accepted the `owner/repo#N` shorthand, which is the GitHub idiom and platform-ambiguous, so a commit could "close" a GitHub-style ref while the canonical tracker is Forgejo. Tighten the checker to assert a Forgejo issue specifically (regex-only, no network): - Accept only bare `#N` (auto-links to this repo's Forgejo issue) or a full `forgejo.coilysiren.me/<owner>/<repo>/issues/N` URL. - Reject the `owner/repo#N` shorthand and non-Forgejo refs (e.g. GitHub issue URLs). - Key same-repo identity off the `forgejo` remote, falling back to `origin`. - Add a pytest suite plus a coily `test` verb to run it. > 🤖 Filed by Claude Code on Kai's behalf.
Author
Owner

🤖 Filed by Claude Code on Kai's behalf.

Closing as a duplicate. This was already implemented upstream under coilysiren/agentic-os-kai#496, with a stronger (URL-only) design: it accepts only the full forgejo.coilysiren.me/<owner>/<repo>/issues/N form and rejects bare #N / owner/repo#N, because GitHub mirrors auto-close from short refs at push time.

🤖 Filed by Claude Code on Kai's behalf.

> 🤖 Filed by Claude Code on Kai's behalf. Closing as a duplicate. This was already implemented upstream under coilysiren/agentic-os-kai#496, with a stronger (URL-only) design: it accepts only the full `forgejo.coilysiren.me/<owner>/<repo>/issues/N` form and rejects bare `#N` / `owner/repo#N`, because GitHub mirrors auto-close from short refs at push time. > 🤖 Filed by Claude Code on Kai's behalf.
Sign in to join this conversation.
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-flight-deck/agentic-os#117
No description provided.