merger

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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

View Source
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.

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
Package noop provides a no-op Merger implementation for local development and testing.
Package noop provides a no-op Merger implementation for local development and testing.

Jump to

Keyboard shortcuts

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