merge

package
v2.0.0-...-98537dd Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: MIT Imports: 19 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

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

Creates a new MergeConext 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)

	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