Documentation
¶
Overview ¶
Package proof hosts a proof image in a public GitHub repository so a public issue or pull request thread can show it: one commit on the repository's images-only branch through the Git data API, made with the gh CLI's own login, and a Markdown image line pinned to that commit.
Index ¶
Constants ¶
const Branch = "beekeeper-proofs"
Branch holds the proof images of a repository: an orphan branch with nothing but images, so it runs no workflow and never meets the default branch.
const MaxBytes = 10 << 20
MaxBytes bounds the image read: a screenshot is far smaller.
Variables ¶
var ErrConflict = errors.New("the proofs branch moved")
ErrConflict is a ref update GitHub refused because the branch moved.
Functions ¶
func Normalize ¶
Normalize decodes a PNG, JPEG or GIF image and encodes it as PNG, which keeps the pixels and drops every metadata chunk (EXIF, text, comments).
Types ¶
type GH ¶
GH runs the gh CLI with input on its stdin and returns its stdout; err carries its stderr.
type Result ¶
type Result struct {
Commit string `json:"commit"`
Path string `json:"path"`
URL string `json:"url"`
Markdown string `json:"markdown"`
}
Result is a hosted image: where it lives and the Markdown that shows it.