Documentation
¶
Overview ¶
Package merger defines the pluggable interface for version-control merge operations that Runway performs on behalf of its callers. Implementations resolve change URIs, apply changes to a merge target, and (for a committing merge) push the result and finalize the change lifecycle (e.g. close PRs).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrConflict = errors.New("merge conflict")
ErrConflict signals that the ordered steps could not be applied cleanly. Controllers treat this as an expected outcome (ack + publish a failure result), not an infrastructure error.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// QueueName is the caller-provided queue name from the MergeRequest.
QueueName string
}
Config identifies the merge target a Merger instance operates on. The factory resolves deployment-specific details (remote URL, credentials) from this.
type Factory ¶
type Factory interface {
// For returns a Merger instance configured for the given merge target.
For(cfg Config) (Merger, error)
}
Factory creates Merger instances bound to a merge target.
type Merger ¶
type Merger interface {
// CheckMergeability performs a dry-run merge without committing. The
// returned MergeResult reports per-step mergeability; Outputs are empty.
CheckMergeability(ctx context.Context, req *runwaymq.MergeRequest) (*runwaymq.MergeResult, error)
// Merge applies the ordered steps, commits the result to the remote, and
// reports per-step Outputs (the VCS-neutral revision identifiers produced).
Merge(ctx context.Context, req *runwaymq.MergeRequest) (*runwaymq.MergeResult, error)
}
Merger performs version-control operations against a single merge target. Both methods accept the same MergeRequest payload; the behavioral difference is whether the result is committed to the remote.