plan

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package plan maps a reconcile report to issue changes.

Index

Constants

View Source
const Label = "baton"

Label marks every issue baton manages.

Variables

This section is empty.

Functions

func CodeSpan

func CodeSpan(s string) string

CodeSpan renders text read from repos, releases, or endpoints as inline code, so it can't mention people, link issues, or inject Markdown. The fence is longer than any run of backticks inside.

func KeyFromBody

func KeyFromBody(body string) string

KeyFromBody returns the obligation key in an issue's hidden marker.

Types

type Item

type Item struct {
	Op         Op       `json:"op"`
	Repo       string   `json:"repo"`
	Key        string   `json:"key"`
	IsParent   bool     `json:"is_parent,omitempty"`
	Parent     string   `json:"parent,omitempty"`      // parent issue key
	ParentRepo string   `json:"parent_repo,omitempty"` // repo holding the parent
	Title      string   `json:"title,omitempty"`
	Body       string   `json:"body,omitempty"`
	Assignees  []string `json:"assignees,omitempty"`
	Evidence   string   `json:"evidence,omitempty"`
}

Item is an issue change a writer would make. Issues carry a hidden marker with Key, so a writer finds them again on every run.

func Plan

func Plan(rep *reconcile.Report) []Item

Plan maps a report to issue changes. Blocked, unknown, errored, and not-applicable obligations never get a new child issue; a blocked one updates its issue if one is already open.

type Op

type Op string

Op is an issue change.

const (
	// OpenOrUpdate creates the issue, or reopens and updates it.
	OpenOrUpdate Op = "open-or-update"
	// UpdateIfOpen keeps an open issue current but never opens one.
	UpdateIfOpen Op = "update-if-open"
	// CloseIfOpen closes the issue as completed.
	CloseIfOpen Op = "close-if-open"
)

Issue changes.

Jump to

Keyboard shortcuts

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