commitstatus

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package commitstatus posts a single commit status scoped to one layer's plan/apply action. There is no pull request to aggregate multiple layers under a single status on a direct push to the base branch, so every affected layer gets its own status, disambiguated by its name.

Index

Constants

View Source
const (
	Needed     = "Pending"
	InProgress = "In progress"
	Succeeded  = "Success"
	Failed     = "Failure"
)

Variables

This section is empty.

Functions

func LogsURL

func LogsURL(publicURL string, layer *configv1alpha1.TerraformLayer, runName string) string

LogsURL builds a link to layer's logs page on the Burrito dashboard at publicURL, scoped to runName when known. Returns "" when publicURL is unset (links are opt-in), leaving the status without a "Details" link.

hidepr=false is appended because the dashboard's "hide PR layers" filter defaults to on: without it, following the link can land on a filtered-out, empty layer list.

func Post

Post sets a commit status for layer's phase (plan or apply), on the given commit. The pending/success/failure state is carried by GitHub/GitLab's own native status field, shown next to the context — so message (which mirrors the layer's "Last Result" field: the short plan/apply summary, or a placeholder like "Layer has never been planned") doesn't need to repeat it. It is truncated as needed since it's the only part with unbounded length. targetURL, if not empty, becomes the status's "Details" link (see LogsURL).

No emoji prefix here: GitHub's Statuses API rejects any 4-byte UTF-8 character (which covers almost every modern emoji, e.g. 🌯) in the description with a 422.

Types

This section is empty.

Jump to

Keyboard shortcuts

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