mrutils

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayAllMRs

func DisplayAllMRs(mrs []*gitlab.MergeRequest, projectID string) string

func DisplayMR

func DisplayMR(mr *gitlab.MergeRequest) string

func GetOpenMRForBranch

func GetOpenMRForBranch(apiClient *gitlab.Client, baseRepo glrepo.Interface, currentBranch string) (*gitlab.MergeRequest, error)

func MRCheckErrors

func MRCheckErrors(mr *gitlab.MergeRequest, err MRCheckErrOptions) error

MRCheckErrors checks and return merge request errors specified in MRCheckErrOptions{}

func MRFromArgs

func MRFromArgs(f *cmdutils.Factory, args []string) (*gitlab.MergeRequest, glrepo.Interface, error)

MRFromArgs is wrapper around MRFromArgsWithOpts without any custom options

func MRFromArgsWithOpts added in v1.13.0

func MRFromArgsWithOpts(f *cmdutils.Factory, args []string, opts *gitlab.GetMergeRequestsOptions) (*gitlab.MergeRequest, glrepo.Interface, error)

MRFromArgsWithOpts gets MR with custom request options passed down to it

func MRState

func MRState(m *gitlab.MergeRequest) string

func MRsFromArgs added in v1.12.0

func MRsFromArgs(f *cmdutils.Factory, args []string) ([]*gitlab.MergeRequest, glrepo.Interface, error)

Types

type MRCheckErrOptions

type MRCheckErrOptions struct {
	// WorkInProgress: check and return err if merge request is a DRAFT
	WorkInProgress bool
	// Closed : check and return err if merge request is closed
	Closed bool
	// Merged : check and return err if merge request is already merged
	Merged bool
	// Opened : check and return err if merge request is already opened
	Opened bool
	// Conflict : check and return err if there are merge conflicts
	Conflict bool
	// PipelineStatus : check and return err pipeline did not succeed and it is required before merging
	PipelineStatus bool
	// MergePermitted : check and return err if user is not authorized to merge
	MergePermitted bool
	// Subscribed : check and return err if user is already subscribed to MR
	Subscribed bool
	// Unsubscribed : check and return err if user is already unsubscribed to MR
	Unsubscribed bool
	// MergePrivilege : check and return err if user is not authorized to merge
	MergePrivilege bool
}

Jump to

Keyboard shortcuts

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