Documentation
¶
Overview ¶
Package remote holds what the commit.Remote implementations share: the names and messages of the branches, commits and pull requests they make.
Index ¶
- Variables
- func IsCommitSHA(ref string) bool
- func RevertBranch(pr commit.PullRequest) string
- func RevertMessage(pr commit.PullRequest, title, body string) string
- func RevertTitle(title string) string
- func StaleBranch(op string, repo commit.Repository, branch, base, prURL string) error
- func UpdateMessage(branch, base string) string
Constants ¶
This section is empty.
Variables ¶
var ErrRevertNotMerged = fmt.Errorf("revert refused: %w", commit.ErrNotMerged)
ErrRevertNotMerged is Revert's refusal of a pull request that is not merged.
Functions ¶
func IsCommitSHA ¶
IsCommitSHA reports whether ref has the shape of a full commit SHA: 40 hexadecimal digits. A ref of that shape that names no branch and no commit is a missing commit, ErrFileNotFound.
func RevertBranch ¶
func RevertBranch(pr commit.PullRequest) string
RevertBranch, RevertTitle and RevertMessage name what Revert makes, the same on every Remote. The "revert:" prefix keeps the title past a semantic pull request check.
func RevertMessage ¶
func RevertMessage(pr commit.PullRequest, title, body string) string
func RevertTitle ¶
func StaleBranch ¶
func StaleBranch(op string, repo commit.Repository, branch, base, prURL string) error
StaleBranch is commit.ErrStaleBranch from op naming the branch and, when it has one, its open pull request (prURL empty otherwise).
func UpdateMessage ¶
UpdateMessage is the message of the merge commit that brings an existing branch up to date with its base, the same on every Remote.
Types ¶
This section is empty.