buildreport

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package buildreport helps maintain tracking issues containing a list of build status entries in a table that may be updated concurrently by multiple data sources. This is used in the release process to keep track of builds for multiple releases happening at the same time.

Index

Constants

View Source
const (
	SymbolFailed     = "❌"
	SymbolSucceeded  = "✅"
	SymbolInProgress = "🏃"
	SymbolNotStarted = "⌚"
)

Symbols are used to indicate report entry status.

Variables

This section is empty.

Functions

func Notify

func Notify(ctx context.Context, owner string, repoName string, pat string, issue int, s State) error

Notify determines if a notification is necessary for the given status update and sends it.

func Update

func Update(ctx context.Context, owner, repoName, pat string, issue int, s State) error

Update updates the report then sends a notification comment if necessary.

func UpdateIssueBody

func UpdateIssueBody(ctx context.Context, owner, repoName, pat string, issue int, s State) error

UpdateIssueBody updates the given issue with new state. Requires the target GitHub repo to have the wiki activated to perform safer concurrent updates than a simple issue description edit.

Types

type State

type State struct {
	// ID of the report. If an AzDO build, the AzDO Build ID.
	ID string
	// Version this report is associated with.
	Version string
	// Name of this type of report. If an AzDO build, the pipeline name.
	Name string
	// URL that the ID should link to. If an AzDO build, the main build page.
	URL string
	// Status represents the status.
	Status string

	LastUpdate time.Time
	StartTime  time.Time
}

State is the status of one entry in the report.

Jump to

Keyboard shortcuts

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