Documentation
¶
Overview ¶
Package forge defines the forge-neutral vocabulary shared by the GitHub and GitLab clients and the cleanup engine: which project a remote names, and which pull or merge requests a commit belongs to.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrProjectNotFound reports that the forge has no such project, or // that the credentials in use cannot see it. ErrProjectNotFound = errors.New("project not found") // ErrCommitUnknown reports that the project does not hold the commit, // typically because it was never pushed there. ErrCommitUnknown = errors.New("commit unknown to project") )
Functions ¶
This section is empty.
Types ¶
type Change ¶
type Change struct {
// Number is the PR number or the MR iid.
Number int
State State
// Head is the full SHA of the change's head commit.
Head string
// URL is the change's web page.
URL string
}
Change is a GitHub pull request or a GitLab merge request.
type Project ¶
type Project struct {
Kind Kind
// Host is the forge's hostname, without scheme or port.
Host string
// Path is the repository's full path on that host: "owner/repo" on
// GitHub, "group/subgroup/project" on GitLab.
Path string
}
Project is one repository on a forge.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package github answers the cleanup engine's forge questions against the GitHub REST API: whether a project exists, its default branch, which pull requests contain a commit, and whether one commit contains another.
|
Package github answers the cleanup engine's forge questions against the GitHub REST API: whether a project exists, its default branch, which pull requests contain a commit, and whether one commit contains another. |
|
Package gitlab answers the cleanup engine's forge questions — does a project exist, which merge requests contain a commit, does one commit contain another — against the GitLab REST API, with credentials taken from the environment or glab's config file.
|
Package gitlab answers the cleanup engine's forge questions — does a project exist, which merge requests contain a commit, does one commit contain another — against the GitLab REST API, with credentials taken from the environment or glab's config file. |