checkmate

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const GithubActionsBotID int64 = 41898282
View Source
const PreambleDefaultMessage = "Thanks for your contribution!\n Please complete the following tasks related to your changes and tick " +
	"the checklists when complete."

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, cfg *Config, action *githubactions.Action, gh *github.Client) error

Types

type Checklist

type Checklist struct {
	Items  []ChecklistItem
	Meta   ChecklistMetadata
	Header string
	Raw    string
}

func Parse

func Parse(action *githubactions.Action, content string) (list []Checklist)

func (Checklist) ChecklistCompleted

func (c Checklist) ChecklistCompleted() bool

func (Checklist) CompletionSummary

func (c Checklist) CompletionSummary() string

CompletionSummary formats the validation result of the checklist.

func (Checklist) MarkdownSummary

func (c Checklist) MarkdownSummary() string

MarkdownSummary formats the markdown for this checklist on the job summary page.

type ChecklistItem

type ChecklistItem struct {
	Message string
	Checked bool
	Raw     string
}

type ChecklistMetadata

type ChecklistMetadata struct {
	RawIndicator string
	FilenameGlob string
	SelectCount  int
}

func ParseIndicator

func ParseIndicator(s string) ChecklistMetadata

ParseIndicator will parse the indicator and extract the metadata within.

type ChecklistsForPath

type ChecklistsForPath []string

func (ChecklistsForPath) ToChecklistItemsMD

func (c ChecklistsForPath) ToChecklistItemsMD(filenameGlob string) string

type Config

type Config struct {
	PathsChecklists map[string]ChecklistsForPath
	Preamble        string
}

func ConfigFromInputs

func ConfigFromInputs(action *githubactions.Action) (*Config, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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