Help us shape the future of Go! Take the 2026 Go Developer Survey

squashrebasemerge

package
v0.0.113 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const MergeUpstreamAdvancedCode = "MERGE_UPSTREAM_ADVANCED"

MergeUpstreamAdvancedCode identifies a prepared candidate that needs rebasing. Recovery policy belongs to the recipe's catch clause.

Variables

This section is empty.

Functions

func GetMergeOp added in v0.0.85

func GetMergeOp() ops.RegisterableOp

func GetOp

func GetOp() ops.RegisterableOp

GetOp exposes the operation to recipe registration.

func GetSquashOp added in v0.0.85

func GetSquashOp() ops.RegisterableOp

Types

type Activity

type Activity struct{}

Activity implements the RegisterableOp interface for squash-rebase-merge.

func NewActivity

func NewActivity() *Activity

NewActivity constructs the squash-rebase-merge activity wrapper.

func (*Activity) GetMetadata

func (a *Activity) GetMetadata() ops.OpMetadata

GetMetadata describes the operation for discovery and documentation.

type MergeInput added in v0.0.85

type MergeInput struct {
	RepoPath         string `json:"repo_path,omitempty" default:"{{ context.environment.worktree_path }}" validate:"required,dir"`
	UpstreamRepo     string `json:"upstream_repo" default:"{{ context.git.repo }}" validate:"required"`
	UpstreamBranch   string `json:"upstream_branch" default:"{{ context.git.ref }}" validate:"required"`
	PreparedBaseHash string `json:"prepared_base_hash,omitempty" validate:"omitempty,hexadecimal,min=7,max=40"`
}

type MergeOutput added in v0.0.85

type MergeOutput struct {
	MergedHash   string `json:"merged_hash"`
	TargetBranch string `json:"target_branch"`
}

type SquashInput added in v0.0.85

type SquashInput struct {
	RepoPath      string `json:"repo_path,omitempty" default:"{{ context.environment.worktree_path }}" validate:"required,dir"`
	BaseHash      string `json:"base_hash,omitempty" default:"{{ context.git.execution.base_hash }}" validate:"omitempty,hexadecimal,min=7,max=40"`
	Author        string `json:"author,omitempty" default:"{{ context.git.author }}"`
	CommitMessage string `json:"commit_message,omitempty"`
}

type SquashOutput added in v0.0.85

type SquashOutput struct {
	SquashedHash    string             `json:"squashed_hash"`
	SquashedCommits SquashRangeSummary `json:"squashed_commits"`
}

type SquashRangeSummary

type SquashRangeSummary struct {
	BaseHash    string `json:"base_hash"`
	PersistHash string `json:"persist_hash"`
}

SquashRangeSummary captures the original commit range that was squashed.

type SquashRebaseMergeInput

type SquashRebaseMergeInput struct {
	RepoPath       string `json:"repo_path,omitempty" default:"{{ context.environment.worktree_path }}" validate:"required,dir"`
	LocalHash      string `json:"local_hash,omitempty" validate:"omitempty,hexadecimal,min=7,max=40"`
	UpstreamRepo   string `json:"upstream_repo" default:"{{ context.git.repo }}" validate:"required"`
	UpstreamBranch string `json:"upstream_branch,omitempty" default:"{{ context.git.ref }}" validate:"required"`
	Rebase         *bool  `json:"rebase,omitempty"`
	Author         string `json:"author,omitempty" default:"{{ context.git.author }}"`
	CommitMessage  string `json:"commit_message,omitempty"`
}

SquashRebaseMergeInput defines the parameters for the squash-rebase-merge git op.

type SquashRebaseMergeOutput

type SquashRebaseMergeOutput struct {
	TargetBranch    string                 `json:"target_branch"`
	RemoteRef       string                 `json:"remote_ref"`
	MergedHash      string                 `json:"merged_hash"`
	SquashedCommits SquashRangeSummary     `json:"squashed_commits"`
	GitContextPatch map[string]interface{} `json:"git_context_patch,omitempty"`
	FastForward     bool                   `json:"fast_forward"`
}

SquashRebaseMergeOutput returns metadata about the merge operation.

func Run

Run executes the same primitives synchronously for Go callers. Durable checkpoints and retry guarantees are provided by GetOp's worker task chain.

Jump to

Keyboard shortcuts

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