Documentation
¶
Overview ¶
Package github collects an organization's team/member/repo/CODEOWNERS topology from the GitHub GraphQL API (CODEOWNERS file contents via REST) into a canonical, JSON-serializable model.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps go-gh clients. raw fetches file contents with the raw Accept header (for CODEOWNERS). gql is used for all data collection queries.
type Collaborator ¶ added in v0.4.0
type Org ¶
type Org struct {
Org string `json:"org"`
CollectedAt string `json:"collected_at"`
Teams []Team `json:"teams"`
Repos []OrgRepo `json:"repos"`
Members []OrgMember `json:"members"`
}
Org is the canonical, hand-editable data model. Its JSON shape matches the legacy /gh-org-chart cache so existing <org>-org.json files remain readable.
type OrgRepo ¶ added in v0.4.0
type OrgRepo struct {
Name string `json:"name"` // full name, "owner/repo"
Archived bool `json:"archived"`
Fork bool `json:"fork"`
Collaborators []Collaborator `json:"collaborators,omitempty"`
}
OrgRepo is the org-wide repo record. Team grants for a repo continue to live under Teams[].Repos; Collaborators holds only DIRECT grants (a user added straight to the repo, not via a team or org membership).