feat(github): add the GitHub adapter's client and core methods #88
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/84-github-adapter"
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?
Summary
lazyforge can now talk to github.com and GitHub Enterprise Server. The new adapter covers repos, PRs with one CI state built from both check runs and commit statuses, merge pinned to the confirmed head, approve, issues, comments, close and releases. Refreshes use conditional requests, so an unchanged list doesn't spend GitHub's 5,000/hour budget. Nothing is user-visible yet: onboarding and connect wiring is #86.
Refs #84 (part of #83)
Decisions
net/httpclient and nogo-github. Also recorded there: the conditional-request cache (1,000 entries, 32 MiB, no body over 1 MiB), the CI fold, the merge-method rule, and a 403 rate limit mapped toErrRateLimited./user/reposdoesn't report those flags, soRepo.MergeStylestays empty and the confirm dialog says "repo default". The reasoning is in the ticket comment..golangci.yml: the depguard rule now coversinternal/forge/githubtoo, the same way it covers gitea, so onlycmd/can import it.Verification
make check(golangci-lint v2.14.0, the version CI pins):shellcheckisn't installed on the dev machine. This MR touches no shell files, and CI runs that step.forgetest.RunContractpasses 9 cases. The 3 asset cases skip becauseAssetReadercomes in #87.total_count > 0guard fails 4 tests. Reverting the vanished-SHA fix fails its 404 and 422 subtests.gh apion 2026-10-09 from public repos (cli/cli,kubernetes/kubernetes,Bparsons0904/*). The synthesized ones are marked as such intestdata/README.md. I checked the fixtures for tokens and private data and found none.Review
Three fresh reviewers ran: standards, comments, and spec. Spec passed.
allow_*flags apart from false ones: merging needs write access, and a write token gets the flags.httpGHES: gitea allows it too.www.github.com, a comma inside a Link URL, and the/mergelabel match: low risk.Docs
docs/architecture.mdhas the GitHub column verified for these rows (runs, jobs and logs are left for #85) and links ADR 0017.CLAUDE.md's file map now listsinternal/forge/github/.design.mdis unchanged: #86 records the release scope.🤖 Generated with Claude Code
https://claude.ai/code/session_01QhCwUhPRAFrAziCumaEa67