merge

package
v2.81.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MergeStateStatusBehind   = "BEHIND"
	MergeStateStatusBlocked  = "BLOCKED"
	MergeStateStatusClean    = "CLEAN"
	MergeStateStatusDirty    = "DIRTY"
	MergeStateStatusHasHooks = "HAS_HOOKS"
	MergeStateStatusMerged   = "MERGED"
	MergeStateStatusUnstable = "UNSTABLE"
)

Variables

View Source
var ErrAlreadyInMergeQueue = errors.New("already in merge queue")

ErrAlreadyInMergeQueue indicates that the pull request is already in a merge queue

Functions

func NewCmdMerge

func NewCmdMerge(f *cmdutil.Factory, runF func(*MergeOptions) error) *cobra.Command

func NewMergeContext added in v2.10.0

func NewMergeContext(opts *MergeOptions) (*mergeContext, error)

Creates a new MergeContext from MergeOptions.

Types

type EnablePullRequestAutoMergeInput

type EnablePullRequestAutoMergeInput struct {
	githubv4.MergePullRequestInput
}

TODO: drop after githubv4 gets updated

type MergeOptions

type MergeOptions struct {
	HttpClient func() (*http.Client, error)
	GitClient  *git.Client
	IO         *iostreams.IOStreams
	Branch     func() (string, error)
	Remotes    func() (ghContext.Remotes, error)
	Prompter   shared.Prompt

	Finder shared.PRFinder

	SelectorArg  string
	DeleteBranch bool
	MergeMethod  PullRequestMergeMethod

	AutoMergeEnable  bool
	AutoMergeDisable bool

	AuthorEmail string

	Body    string
	BodySet bool
	Subject string
	Editor  editor

	UseAdmin                bool
	IsDeleteBranchIndicated bool
	CanDeleteLocalBranch    bool
	MergeStrategyEmpty      bool
	MatchHeadCommit         string
}

type PullRequestMergeMethod

type PullRequestMergeMethod int
const (
	PullRequestMergeMethodMerge PullRequestMergeMethod = iota
	PullRequestMergeMethodRebase
	PullRequestMergeMethodSquash
)

Jump to

Keyboard shortcuts

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