github

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	GH      *github.Client
	Profile *config.Profile
}

Client wraps the GitHub API for a single rel profile.

func NewClient

func NewClient(profile *config.Profile) (*Client, error)

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

func (c *Client) CheckSyncStatus(ctx context.Context, repo string) (bool, error)

CheckSyncStatus reports whether the base branch is ahead of the dev branch.

func (*Client) CheckTeam

func (c *Client) CheckTeam(ctx context.Context, owner, team string) error

CheckTeam verifies that the token can list the repositories of a team.

func (*Client) CreateReleaseBranch

func (c *Client) CreateReleaseBranch(ctx context.Context, repo, branchName string) error

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

func (c *Client) CreateSyncPR(ctx context.Context, repo string) (string, error)

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

func (c *Client) FetchRepos(ctx context.Context) ([]string, error)

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

func (c *Client) GetLatestReleaseTag(ctx context.Context, repo string) (string, error)

GetLatestReleaseTag returns the most recent tag of a repository.

func (*Client) ResolveOwner

func (c *Client) ResolveOwner(ctx context.Context, owner string) (config.OwnerType, error)

ResolveOwner reports whether the given login is an organization or a user.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL