gh

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRemoteName = "origin"
	DefaultGitDir     = ".git"
)
View Source
const AsynchronousTimeout = 60 * time.Second

Variables

View Source
var (
	ErrBranchNotFound = errors.New("branch not found")
)
View Source
var RegRefPullRequest = regexp.MustCompile(`^refs/pull/(\d+)/head$`)

Functions

This section is empty.

Types

type Github

type Github interface {
	CreateReleasePR(ctx context.Context, title, fromBranch, toBranch, body string) (*github.PullRequest, error)
	GetReleasePR(ctx context.Context, fromBranch, toBranch string) (*github.PullRequest, error)
	GetMergedPRs(ctx context.Context, fromBranch, toBranch string) (PullRequests, error)
	AssignReviews(ctx context.Context, prNumber int, reviewers ...string) (*github.PullRequest, error)
	Labeling(ctx context.Context, prNumber int, labels ...string) ([]*github.Label, error)
}

func New

func New(ctx context.Context, token string, logger *slog.Logger) (Github, error)

func NewWithConfig

func NewWithConfig(ctx context.Context, token string, logger *slog.Logger, remoteConfig RemoteConfig) (Github, error)

type PullRequests added in v0.1.4

type PullRequests []*github.PullRequest

func (PullRequests) FindHash added in v0.1.4

func (prs PullRequests) FindHash(sha string) (*github.PullRequest, bool)

func (PullRequests) SHAs added in v0.1.4

func (prs PullRequests) SHAs() []string

type RemoteConfig

type RemoteConfig struct {
	Owner string
	Repo  string
}

Jump to

Keyboard shortcuts

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