Documentation
¶
Overview ¶
Package writer carries out an issue plan on GitHub.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissingLabel = errors.New("missing label")
ErrMissingLabel is returned when a repo lacks the baton label.
View Source
var ErrNoRedirect = errors.New("apply needs --redirect-owner: the preview doesn't write to real repos")
ErrNoRedirect is returned when writing without a sandbox owner. The preview never writes to the real component repos.
View Source
var ErrUnknownOp = errors.New("unknown plan op")
ErrUnknownOp is returned for a plan item the writer can't carry out.
Functions ¶
This section is empty.
Types ¶
type Issue ¶
type Issue struct {
ID int64
Number int
State string // "open" or "closed"
Title string
Body string
}
Issue is the part of a GitHub issue the writer uses.
type Issues ¶
type Issues interface {
LabelExists(repo, label string) (bool, error)
CreateLabel(repo, label, color, description string) error
// ListIssues returns open and closed issues with label, without PRs.
ListIssues(repo, label string) ([]Issue, error)
CreateIssue(repo, title, body string, labels, assignees []string) (Issue, error)
UpdateIssue(repo string, number int, u Update) (Issue, error)
Comment(repo string, number int, body string) error
SubIssueIDs(repo string, number int) ([]int64, error)
AddSubIssue(repo string, number int, childID int64) error
}
Issues is the issue API the writer needs. Repos are "owner/name".
type Options ¶
type Options struct {
// RedirectOwner sends every issue for owner/name to
// RedirectOwner/name, prefixes titles with the intended repo, and
// drops assignees so no real maintainer is notified.
RedirectOwner string
// CreateLabel creates the baton label when a repo lacks it.
// Otherwise a missing label is an error.
CreateLabel bool
}
Options control where and how issues are written.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer applies plans.
Click to show internal directories.
Click to hide internal directories.