Documentation
¶
Overview ¶
Package apply implements the `apply` verb: carry what a commit asserted to the forge object it names.
Index ¶
- Variables
- func CapabilitiesFrom(provider forge.Provider) deps
- func NewCmdApply(props *props.Props) *setup.Command
- func Run(ctx context.Context, p *props.Props, opts *ApplyOptions, w io.Writer) error
- func RunApply(ctx context.Context, p *props.Props, opts *ApplyOptions, _ []string) error
- type ApplyOptions
- type Options
- type Prepared
Constants ¶
This section is empty.
Variables ¶
var ErrInstructionsFailed = errors.New("apply: some instructions were not carried")
ErrInstructionsFailed reports a run that carried what it could and had at least one instruction the forge refused.
The run is still complete: every other instruction was applied and the report names each one. This exists so the outcome reaches the pipeline as well as the log, which it did not before — a job whose only instruction failed went green, and the drift it existed to prevent happened anyway (spec 0022 D3, colophon#28).
var ErrUnknownForge = errors.New("apply: unrecognised forge host")
ErrUnknownForge reports a remote whose forge could not be identified.
Functions ¶
func CapabilitiesFrom ¶
CapabilitiesFrom discovers the three capabilities a provider offers. Any may be missing: Bitbucket has merge-request comments and neither issues nor a wiki.
Types ¶
type ApplyOptions ¶
type Options ¶
type Options struct {
Repo string
Remote string
Forge string
// From and To bound the commits this run reads. From empty, or the
// all-zero SHA a forge sends for the first push to a branch, means the
// tip alone (spec 0012 D6).
From string
To string
}
Options are the command's inputs.