Make hooks Forgejo-native (dual-stack GitHub + Forgejo) #1

Closed
opened 2026-02-23 15:04:27 +00:00 by forgejo_admin · 0 comments
Contributor

Problem

All hooks use gh CLI which only works with GitHub repos. Forgejo repos (like basketball-api) bypass all enforcement.

Solution

Update hooks to detect whether a repo remote points to GitHub or Forgejo, and use the appropriate API.

Hooks to update

  • check-issue.sh — validate issues via Forgejo API when remote is Forgejo
  • remind-review-loop.sh — trigger for Forgejo PRs too
  • block-pr-merge.sh — intercept Forgejo PR merges
  • block-main-commits.sh — already git-native, verify it works
  • Create forgejo-helper.sh — shared functions for Forgejo API calls

Notion SOPs to update

  • SOP-2: GitHub Branch Protection — add Forgejo equivalent
  • SOP-11: Never Merge PRs Without Manual Approval — Forgejo context
  • SOP-12: PR Review-Fix Loop — Forgejo PR workflow

Related: PROJ-17 Basketball Program SaaS (first Forgejo-deployed service)

## Problem All hooks use `gh` CLI which only works with GitHub repos. Forgejo repos (like basketball-api) bypass all enforcement. ## Solution Update hooks to detect whether a repo remote points to GitHub or Forgejo, and use the appropriate API. ## Hooks to update - [ ] `check-issue.sh` — validate issues via Forgejo API when remote is Forgejo - [ ] `remind-review-loop.sh` — trigger for Forgejo PRs too - [ ] `block-pr-merge.sh` — intercept Forgejo PR merges - [ ] `block-main-commits.sh` — already git-native, verify it works - [ ] Create `forgejo-helper.sh` — shared functions for Forgejo API calls ## Notion SOPs to update - [ ] SOP-2: GitHub Branch Protection — add Forgejo equivalent - [ ] SOP-11: Never Merge PRs Without Manual Approval — Forgejo context - [ ] SOP-12: PR Review-Fix Loop — Forgejo PR workflow Related: PROJ-17 Basketball Program SaaS (first Forgejo-deployed service)
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
ldraney/claude-custom#1
No description provided.