Uh oh!
There was an error while loading. Please reload this page.
feat: standardize GitHub platform ops on go-github, keep git for content (#460) - #464
Closed
antoinetoussaint-byte wants to merge 2 commits into
Closed
Conversation
antoinetoussaint-byteforce-pushed
the
issue-460-github-integration-standardize-on-go-github-api-for
branch
from
August 23, 2026 21:56
1e7a889 to
d7ea96aCompareCompletes the go-github standardization for the platform (REST API) operations that #457 (agent-release publishing, merged in #462) did not cover, reconciled onto the shared pkg/gh helper that #462 introduced rather than the separate pkg/github this work originally added: - pkg/gitops/publish.go: promotion pull-request list/create/edit/verify move from `gh pr *` to PullRequests.List/Create/Edit/Get. - cmd/status/release.go: chore issue creation moves from `gh issue create` to Issues.Create. - pkg/librarystore/github.go: a first-ever library publish now creates the target repo via Repositories.Get-then-Create when the clone fails, instead of erroring; content publishing stays on git. - pkg/gh: gains RepoAtDir/ParseRemote (owner/repo from the origin remote) alongside the existing NewClient/Token/Owner. Deliberately unchanged: pkg/gitops/observe.go still reads reviewDecision through `gh` — a GraphQL-only field with no REST equivalent; deriving it from REST review lists would weaken the promotion security gate. Git content ops (clone/add/commit/tag/push) stay on the git binary. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
antoinetoussaint-byteforce-pushed
the
issue-460-github-integration-standardize-on-go-github-api-for
branch
from
August 23, 2026 22:03
d7ea96a to
230376fCompareCo-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
antoinetoussaint-byte
commented
Aug 23, 2026
ContributorAuthor
Superseded — closing without merging. The #460 umbrella work landed on
|
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes#460.
Closes#459.
Summary
Aligns GitHub integration on one principle: git for content operations, the go-github API for platform operations. This is the remainder of #460 after #457's agent-release migration landed separately in #462 — reconciled onto the shared
pkg/ghhelper that #462 introduced (rather than the separatepkg/githubthis branch originally added, which would have duplicated the client/token path and collided with thegithubimport name).No new dependency —
github.com/google/go-github/v89was already direct.What moved to the API
pkg/gitops/publish.go— promotion PRgh pr list/create/edit/viewPullRequests.List/Create/Edit/Getcmd/status/release.go— chore issuegh issue createIssues.Createpkg/librarystore/github.go— repo creation gapRepositories.GetthenCreatewhen missing (content publish stays on git)pkg/ghgainsRepoAtDir/ParseRemote(owner/repo from the origin remote) alongside the existingNewClient/Token/Owner.Deliberately kept on
gh/ gitpkg/gitops/observe.gostill usesgh pr viewfor the promotion gate: it readsreviewDecision, a GraphQL-only field with no go-github REST equivalent. Deriving it from REST review lists would weaken a security gate (it would ignore required-reviewer / CODEOWNERS policy), so this read stays as-is.gh auth tokencredential fallback stays — a convenience, not a hard dependency.Test plan
go build ./...,go vet,gofmtcleango test ./pkg/gh/... ./pkg/gitops/... ./cmd/status/... ./pkg/librarystore/... ./cmd/publish/... ./cmd/agents/...pkg/ghParseRemotecases (HTTPS/SSH/ssh://, trailing slash, non-github.com host rejected)httptestserver via thenewGitHubClientseam🤖 Generated with Claude Code