MF-1: GitHub adapter for ForgePort #292
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#292
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
As a platform engineer, I want a GitHub implementation of
ForgePortso that a GitHub-hosted repo routes through the exact same domain code paths as Forgejo, with no adapter-awareness leaking into the agent runner.Acceptance criteria
Adapter surface
apps/server/src/infrastructure/forge/github-adapter.tsimplementing every method onForgePort(seeforgejo-port.ts).token_filescheme the Forgejo adapter uses today. GitHub App installation tokens are deferred (see Out of scope).null/falseper theForgePortcontract — no throwing across the hex boundary.Issues & labels
getIssue/listIssues: RESTGET /repos/{owner}/{repo}/issues[?...]. Filters:labels,milestone(by title → id lookup),state,limit(per_page).addLabels/removeLabel: REST/issues/{n}/labels. No numeric-id dance — GitHub accepts names.Pull requests & reviews
getPullRequest/listPullRequests: REST/pulls,baseReffilter viabase=query.requestReview/removeReviewRequest/listReviews: REST/pulls/{n}/requested_reviewers+/reviews.Dependencies (divergence)
getBlockers/getBlockedparse the issue body forDepends on #n/Blocks #nlines (the existing fallback path indeps.ts).addBlockerappends the line to the body.CI / workflow status
getAggregateStatus/listWorkflowRuns/getJobLogs: REST/commits/{sha}/check-runs+/actions/runs+/actions/jobs/{jobId}/logs.repoHasWorkflows: HEAD/contents/.github/workflows.Files & repo scope
writeFile: RESTPUT /contents/{path}with base64 body + sha.listAccessibleRepos:/user/repos?affiliation=owner,collaborator.Rate-limit handling
X-RateLimit-Remaining: 0, wait untilX-RateLimit-Reset(bounded retry, max 1 attempt) before surfacing the error.Tests
Out of scope
ForgePortcontract.References
specs/multi-forge.md§ MF-1.apps/server/src/infrastructure/forge/forgejo-port.ts— port surface to preserve.apps/server/src/infrastructure/forge/forgejo-adapter.ts— reference adapter.apps/server/src/domain/workflow/deps.ts— existing body-text parser used as fallback.Dependencies
webhook-config/agent-runner.