Documentation
¶
Index ¶
- type Client
- func (c *Client) CheckSyncStatus(ctx context.Context, repo string) (bool, error)
- func (c *Client) CheckTeam(ctx context.Context, owner, team string) error
- func (c *Client) CreateReleaseBranch(ctx context.Context, repo, branchName string) error
- func (c *Client) CreateReleasePR(ctx context.Context, repo, branchName, version string) (string, error)
- func (c *Client) CreateSyncPR(ctx context.Context, repo string) (string, error)
- func (c *Client) DetectBranches(ctx context.Context, repo string) (base string, dev string, err error)
- func (c *Client) FetchRepos(ctx context.Context) ([]string, error)
- func (c *Client) GetLatestReleaseTag(ctx context.Context, repo string) (string, error)
- func (c *Client) ResolveOwner(ctx context.Context, owner string) (config.OwnerType, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client wraps the GitHub API for a single rel profile.
func NewClient ¶
NewClient builds an authenticated client bound to the given profile. The profile may be nil for calls that only need to inspect an owner (for example the setup wizard).
func (*Client) CheckSyncStatus ¶
CheckSyncStatus reports whether the base branch is ahead of the dev branch.
func (*Client) CreateReleaseBranch ¶
CreateReleaseBranch cuts a release branch from the dev branch.
func (*Client) CreateReleasePR ¶
func (c *Client) CreateReleasePR(ctx context.Context, repo, branchName, version string) (string, error)
CreateReleasePR opens the release branch against the base branch.
func (*Client) CreateSyncPR ¶
CreateSyncPR opens a PR that merges the base branch back into the dev branch.
func (*Client) DetectBranches ¶
func (c *Client) DetectBranches(ctx context.Context, repo string) (base string, dev string, err error)
DetectBranches inspects a sample repository and suggests the base branch (its default branch) and the dev branch (the first well known dev-style branch that exists, otherwise the base branch).
func (*Client) FetchRepos ¶
FetchRepos lists the repositories the profile targets, applying its include and exclude filters. When a team is configured it is used first; if the team cannot be read (missing scope, wrong slug) it falls back to listing the whole owner so the tool stays usable.
func (*Client) GetLatestReleaseTag ¶
GetLatestReleaseTag returns the most recent tag of a repository.