Documentation
¶
Overview ¶
Package pr is the f10 pr command: a change's base, diff and description, and opening, editing and commenting on its PR or MR.
Index ¶
- func ChecksFacts(url string, hc forge.HeadChecks) []render.Fact
- func ChecksLine(hc forge.HeadChecks) string
- func Command() *cli.Command
- func CommentOnce(ctx context.Context, warn io.Writer, h hostops.Host, p forge.PR, ...) (string, error)
- func MineLine(ctx context.Context, warn io.Writer, h hostops.Host, p forge.PR) string
- func PatchFiles(patch string) string
- func PullTitle(title string, task *ref.Ref) string
- func RequireOpen(p forge.PR) error
- func ShipStopped() bool
- func StatusOnce(ctx context.Context, warn io.Writer, h hostops.Host, p forge.PR, sha string, ...) (string, error)
- func TriageFacts(tr *checkTriage) []render.Fact
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChecksFacts ¶ added in v0.60.0
func ChecksFacts(url string, hc forge.HeadChecks) []render.Fact
ChecksFacts is the block pr checks prints: the request, its head, the state and the set counted, then a row per failed job with its log.
func ChecksLine ¶ added in v0.60.0
func ChecksLine(hc forge.HeadChecks) string
ChecksLine is the one-line form ship reads at each entry: `checks: red (lint, test)`.
func Command ¶
Command is the pr noun, which needs nothing declared: the CLI follows from the git remote, which probe already answers.
func CommentOnce ¶
func CommentOnce( ctx context.Context, warn io.Writer, h hostops.Host, p forge.PR, replyTo, quote, body string, ) (string, error)
CommentOnce never posts the same text twice where it lands: a retry after a post whose answer was lost finds it and returns its url instead. quote heads a reply that fell back to the top level, which no thread places.
func MineLine ¶
MineLine says whether the signed-in user opened p. A failed login read or a request with no author is unknown, never no, so a step guarding someone else's PR stops on it; the view itself goes on, since explain and demo need none of it.
func PatchFiles ¶
PatchFiles is the paths a unified diff touches, for a host diff with no --name-only of its own.
func PullTitle ¶
PullTitle is the title a request opens or is retitled with: a bundle's names its riders after the lead id, whatever the draft said.
func RequireOpen ¶
func ShipStopped ¶
func ShipStopped() bool
ShipStopped reads this session's ship status; no session or no run file is a ship that never stopped.
func StatusOnce ¶
func StatusOnce( ctx context.Context, warn io.Writer, h hostops.Host, p forge.PR, sha string, s forge.CommitStatus, ) (string, error)
StatusOnce sets the status on the head only, so it never lands on a commit the PR has moved past; sha, when given, is the head the caller judged. One already set the same way is left alone, so a retry never posts twice.
func TriageFacts ¶ added in v0.60.0
TriageFacts are the rows --triage adds: the failure to read, how its job last ended on the default branch, and what this red spell tried.
Types ¶
This section is empty.