create

package
v2.0.1-0...-d4b4061 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdCreate

func NewCmdCreate(f *cmdutil.Factory, runF func(*CreateOptions) error) *cobra.Command

func NewIssueState

func NewIssueState(ctx CreateContext, opts CreateOptions) (*shared.IssueMetadataState, error)

Types

type CreateContext

type CreateContext struct {
	// This struct stores contextual data about the creation process and is for building up enough
	// data to create a pull request
	RepoContext        *context.ResolvedRemotes
	BaseRepo           *api.Repository
	HeadRepo           ghrepo.Interface
	BaseTrackingBranch string
	BaseBranch         string
	HeadBranch         string
	HeadBranchLabel    string
	HeadRemote         *context.Remote
	IsPushEnabled      bool
	Client             *api.Client
}

func NewCreateContext

func NewCreateContext(opts *CreateOptions) (*CreateContext, error)

type CreateOptions

type CreateOptions struct {
	// This struct stores user input and factory functions
	HttpClient func() (*http.Client, error)
	Config     func() (config.Config, error)
	IO         *iostreams.IOStreams
	Remotes    func() (context.Remotes, error)
	Branch     func() (string, error)
	Browser    browser
	Finder     shared.PRFinder

	TitleProvided bool
	BodyProvided  bool

	RootDirOverride string
	RepoOverride    string

	Autofill    bool
	WebMode     bool
	RecoverFile string

	IsDraft    bool
	Title      string
	Body       string
	BaseBranch string
	HeadBranch string

	Reviewers []string
	Assignees []string
	Labels    []string
	Projects  []string
	Milestone string

	MaintainerCanModify bool
}

type RegexpWriter

type RegexpWriter struct {
	// contains filtered or unexported fields
}

func NewRegexpWriter

func NewRegexpWriter(out io.Writer, re *regexp.Regexp, repl string) *RegexpWriter

func (*RegexpWriter) Flush

func (s *RegexpWriter) Flush() (int, error)

func (*RegexpWriter) Write

func (s *RegexpWriter) Write(data []byte) (int, error)

Jump to

Keyboard shortcuts

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