Documentation
¶
Overview ¶
Package githubpr wraps the git + gh CLI invocations seictl onboard uses to land an engineer cell as a PR against the platform repo.
Production callers stub this whole package via the onboard verb's dep seam; tests don't usually need to exercise the shell-out layer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAuth ¶
func CheckAuth() error
CheckAuth runs `gh auth status`. seictl onboard refuses to run without it because we'd fail at PR creation anyway and leave a half-prepared branch behind.
func CheckCleanTree ¶
CheckCleanTree returns nil if the platform repo has no staged or unstaged changes to tracked files. Untracked files are tolerated because CreatePR adds explicit paths via `git add <file>`, never `-A`.
func DiscoverRepo ¶
DiscoverRepo walks up from start looking for a directory that contains both `.git/` and `clusters/harbor/`. Returns the absolute path or an error if no marker is found by the filesystem root.
func EnsureBaseUpToDate ¶
EnsureBaseUpToDate errors if local HEAD is missing commits from origin/<baseBranch>. Without this guard, onboard would read a stale aggregator from the working tree and silently overwrite peer entries when the PR landed.
Types ¶
type Options ¶
type Options struct {
RepoPath string // platform repo on disk
Branch string // e.g. "seictl/onboard-bdc"
BaseBranch string // usually "main"
CommitMessage string
PRTitle string
PRBody string
Files map[string][]byte // repo-relative path → content
}
Options drives a CreatePR run.