create

package
v1.24.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdCreate

func NewCmdCreate(f *cmdutils.Factory, runE func(opts *CreateOpts) error) *cobra.Command

Types

type CreateOpts

type CreateOpts struct {
	Title                 string
	Description           string
	SourceBranch          string
	TargetBranch          string
	TargetTrackingBranch  string
	Labels                []string
	Assignees             []string
	Reviewers             []string
	MileStone             int
	MilestoneFlag         string
	MRCreateTargetProject string

	RelatedIssue    string
	CopyIssueLabels bool

	CreateSourceBranch bool
	RemoveSourceBranch bool
	AllowCollaboration bool
	SquashBeforeMerge  bool

	Autofill       bool
	FillCommitBody bool
	IsDraft        bool
	IsWIP          bool
	ShouldPush     bool
	NoEditor       bool
	IsInteractive  bool
	Yes            bool
	Web            bool

	IO       *iostreams.IOStreams
	Branch   func() (string, error)
	Remotes  func() (glrepo.Remotes, error)
	Lab      func() (*gitlab.Client, error)
	Config   func() (config.Config, error)
	BaseRepo func() (glrepo.Interface, error)
	HeadRepo func() (glrepo.Interface, error)

	// SourceProject is the Project we create the merge request in and where we push our branch
	// it is the project we have permission to push so most likely one's fork
	SourceProject *gitlab.Project
	// TargetProject is the one we query for changes between our branch and the target branch
	// it is the one we merge request will appear in
	TargetProject *gitlab.Project
}

Jump to

Keyboard shortcuts

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