refactor(git): split github.go into per-domain files - #282
Merged
Conversation
Splits the 530-LOC git/github.go into five files grouped by GitHub domain, with no behavior changes: - github_clone.go CloneGithub - github_branch.go CreateGithubBranch, DeleteGithubBranch - github_pull_request.go CreateGithubPullRequest - github_issue.go CreateGithubIssue - github_commit.go AddFile/Folder/FilesToGithubBranch Also moves the package-level `workDir` var into container.go (its natural home alongside the container helper). `dagger functions -m ./git` lists the same 11 functions with the same descriptions as before the split. `go build`, `go vet` and `gofmt -l` all clean. Refs #262 (P3 — split oversized files; `git/github.go` slice). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
patrick-hermann-sva
temporarily deployed
to
linting
May 28, 2026 07:13 — with
GitHub Actions
Inactive
11 tasks
Contributor
Author
|
🎉 This PR is included in version 0.115.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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 free
to 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.
Summary
Splits
git/github.go(530 LOC) into five files grouped by GitHub domain. Pure code move — no behavior changes.github_clone.goCloneGithubgithub_branch.goCreateGithubBranch,DeleteGithubBranchgithub_pull_request.goCreateGithubPullRequestgithub_issue.goCreateGithubIssuegithub_commit.goAddFileToGithubBranch,AddFolderToGithubBranch,AddFilesToGithubBranchThe package-level
workDir = "/src"var moved fromgithub.gointocontainer.go(its natural home alongside the container helper).Refs #262 — P3 "Split oversized files:
git/github.go". Follow-up PR will tackledependencies/ansible.go(314 LOC).Side effects worth a glance
Two pre-existing comment-glued-to-code quirks resolved as an unavoidable side effect of the split:
} // DeleteGithubBranch— closing brace had the next func's doc comment glued to itWithExec(...) // Copy the source directory— block comment glued to end of statementBoth are cosmetic; neither changes behavior.
Test plan
go build ./...cleango vet ./...cleangofmt -lcleandagger functions -m ./gitlists same 11 functions with same descriptions asmain🤖 Generated with Claude Code