Documentation
¶
Overview ¶
Package discover finds the repositories to operate on by reconciling the local ~/projects/{org}/{repo} tree with the non-archived repositories GitHub reports for the relevant orgs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MemberOrgs ¶
MemberOrgs returns the GitHub orgs the authenticated user belongs to. This is the authoritative source of "owners I control" — local directory names are not, since they include third-party clones.
Types ¶
type Repo ¶
type Repo struct {
Org string
Name string
Path string // local working-tree path; empty if not cloned locally
CloneURL string // ssh URL from GitHub; empty if only known locally
Archived bool
IsFork bool
Local bool
Remote bool
}
Repo identifies a single repository and where it lives.
func ListRemote ¶
ListRemote returns all repos for owner via gh. The archived flag is preserved so callers can report and skip archived repos explicitly.
func Reconcile ¶
Reconcile merges locally-cloned repos with remotely-listed ones, keyed by org/name. Remote metadata (archived flag, clone URL) wins where both exist. The result is sorted by slug for deterministic output.