feat(forgejo): onboard repositories from Settings → Workspaces #268
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!268
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/issue-266-forgejo-onboarding"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds the deterministic, server-side onboarding action from #266.
What it does. Every Forgejo-matched workspace row in Settings → Workspaces gets an Onboard button. The dialog collects which behaviours to enable (issue handler, implementation flow, automatic reviews, CI watchdog for others' PRs and for branch globs, pushing to others' PR branches) and the label names for them — prefilled in the repository's own casing, decided from its existing labels.
POST /forgejo/onboardthen creates the labels that are missing (an existing repository or organisation label of the same folded name is reused;Status/Blockedis always included), commits.omp/forgejo.yamlonomp-deck/onboardingand opens a pull request that documents what it enables and which labels it needed.Guards. The rendered file goes through
parseRepoConfigbefore it is committed, so a renderer bug can never reach a PR. A repository that already has the file on its default branch is refused with 409; the workspaces feed now reports that state (onboarded), so the button is disabled when it is known.Webhook probe. A repository can be fully configured and still inert. The onboarding PR is itself the probe: 60 s after it is opened the deck reads its own delivery log and, when no delivery for that repository arrived, comments on the PR naming the cause — no webhook at all, one that does not cover this repository, or a secret that does not match the broker's. The deck never creates or inspects the webhook; the secret lives only in the broker's config.
Verification.
bun test src/forgejo/onboarding-config.test.ts src/forgejo/onboarding-probe.test.ts src/routes-forgejo.test.ts— 39 pass (render→parse round trip for the full and the empty selection, label-name distinctness under the config parser's folding, label style detection, the four webhook verdicts, and the route's 200/409/502/400 paths with a recordingDispatchApistub).bun testinapps/server— 1352 pass, 0 fail.bun run typecheckat the root — clean.force_overwrite_new_branchand#rrggbblabel colors.Closes: #266