Documentation
¶
Overview ¶
Package github implements forge.Forge with the gh CLI.
Index ¶
- type Forge
- func (f *Forge) CreatePR(ctx context.Context, repo git.Repo, in forge.CreatePR) (forge.PullRequest, error)
- func (f *Forge) ListPRs(ctx context.Context, repo git.Repo) ([]forge.PullRequest, error)
- func (f *Forge) MergeStack(ctx context.Context, repo git.Repo, number int, method forge.MergeMethod) (forge.MergeOutcome, error)
- func (f *Forge) UpdatePR(ctx context.Context, repo git.Repo, number int, in forge.UpdatePR) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Forge ¶
type Forge struct {
// contains filtered or unexported fields
}
Forge talks to GitHub through gh.
func (*Forge) CreatePR ¶
func (f *Forge) CreatePR(ctx context.Context, repo git.Repo, in forge.CreatePR) (forge.PullRequest, error)
CreatePR opens a pull request and returns it.
func (*Forge) ListPRs ¶
ListPRs returns every pull request of the repository whose head branch lives in this repository (forks are skipped), newest first as gh orders.
func (*Forge) MergeStack ¶ added in v0.1.5
func (f *Forge) MergeStack(ctx context.Context, repo git.Repo, number int, method forge.MergeMethod) (forge.MergeOutcome, error)
MergeStack merges a pull request and every open pull request below it in its stack through GitHub's asynchronous merge endpoint, the only one that accepts stacked pull requests, and polls until it settles.