Documentation
¶
Overview ¶
Package forge is the port for pull-request operations. It is vendor neutral: GitHub via gh, GitHub via the REST API and GitLab are adapters.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Forge ¶
type Forge interface {
// ListPRs returns every pull request whose head is a branch of this
// repository, in one call.
ListPRs(ctx context.Context, repo git.Repo) ([]PullRequest, error)
CreatePR(ctx context.Context, repo git.Repo, in CreatePR) (PullRequest, error)
UpdatePR(ctx context.Context, repo git.Repo, number int, in UpdatePR) error
}
Forge performs pull-request operations for the repository's remote.
type PullRequest ¶
type PullRequest struct {
Number int `json:"number"`
URL string `json:"url"`
Title string `json:"title"`
Body string `json:"body,omitempty"`
State State `json:"state"`
Head string `json:"head"`
Base string `json:"base"`
UpdatedAt time.Time `json:"updatedAt"`
}
PullRequest is a forge-neutral pull request.