pr

package
v0.65.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 27 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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

func Command() *cli.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

func MineLine(ctx context.Context, warn io.Writer, h hostops.Host, p forge.PR) string

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

func PatchFiles(patch string) string

PatchFiles is the paths a unified diff touches, for a host diff with no --name-only of its own.

func PullTitle

func PullTitle(title string, task *ref.Ref, titles tasktitle.Template) string

PullTitle is the title a request opens or is retitled with. It carries the lead's id through tracker.title whatever the draft said. A bundle's names its riders after that id.

func RequireOpen

func RequireOpen(p forge.PR) error

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

func TriageFacts(tr *checkTriage) []render.Fact

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL