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

Open
opened 2026-05-31 03:34:35 +00:00 by coilysiren · 0 comments
Owner

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.
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.
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-flight-deck/agentic-os#116
No description provided.