Help us shape the future of Go! Take the 2026 Go Developer Survey

issuecmd

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IssueCmd = &cobra.Command{
	Use:   "issue",
	Short: "Create, read, list and respond to issues",
	Long:  ``,
	Run: func(cmd *cobra.Command, args []string) {
		cmd.Help()
	},
}

IssueCmd represents the issue command

Functions

func IssueCloseCmd

func IssueCloseCmd(r types.LocalRepo, args *IssueCloseArgs) error

IssueCloseCmd adds a close directive

func IssueCreateCmd

func IssueCreateCmd(r types.LocalRepo, args *IssueCreateArgs) error

IssueCreateCmd create a new Issue or adds a comment commit to an existing Issue

func IssueListCmd

func IssueListCmd(targetRepo types.LocalRepo, args *IssueListArgs) error

IssueListCmd list all issues

func IssueReadCmd

func IssueReadCmd(targetRepo types.LocalRepo, args *IssueReadArgs) error

IssueReadCmd read comments in an issue

func IssueReopenCmd

func IssueReopenCmd(r types.LocalRepo, args *IssueReopenArgs) error

IssueReopenCmd adds a negative close directive to an issue

func IssueStatusCmd

func IssueStatusCmd(r types.LocalRepo, args *IssueStatusArgs) error

IssueStatusCmd prints the status of an issue

func NormalizeIssueReferenceName

func NormalizeIssueReferenceName(curRepo types.LocalRepo, args []string) string

NormalizeIssueReferenceName normalizes a reference from args[0] to one that is a valid full issue reference name.

Types

type IssueCloseArgs

type IssueCloseArgs struct {

	// Reference is the full reference path to the issue
	Reference string

	// PostCommentCreator is the post commit creating function
	PostCommentCreator plumbing.PostCommitCreator

	// ReadPostBody is a function for reading post body in a commit
	ReadPostBody plumbing.PostBodyReader

	// Force indicates that uncommitted changes should be ignored
	Force bool
}

IssueCloseArgs contains parameters for IssueCloseCmd

type IssueCreateArgs

type IssueCreateArgs struct {
	// IssueID is the unique Issue ID
	ID int

	// Title is the title of the Issue
	Title string

	// Body is the Issue's body
	Body string

	// ReplyHash is the hash of a comment commit
	ReplyHash string

	// Reactions adds or removes reactions to/from a comment commit
	// Negated reactions indicate removal request
	Reactions []string

	// Labels may include terms used to classify the Issue
	Labels *[]string

	// Assignees may include push keys that may be interpreted by an application
	Assignees *[]string

	// UseEditor indicates that the body of the Issue should be collected using a text editor.
	UseEditor bool

	// EditorPath indicates the path to an editor program
	EditorPath string

	// NoBody prevents prompting user for issue body
	NoBody bool

	// Close sets close status to 1.
	Close *bool

	// Open sets close status to 0
	Open *bool

	// Force indicates that uncommitted changes should be ignored
	Force bool

	// StdOut receives the output
	StdOut io.Writer

	// StdIn receives input
	StdIn io.ReadCloser

	// PostCommentCreator is the post commit creating function
	PostCommentCreator plumbing.PostCommitCreator

	// EditorReader is used to read from an editor program
	EditorReader util.EditorReaderFunc

	// InputReader is a function that reads input from stdin
	InputReader io2.InputReader
}

type IssueListArgs

type IssueListArgs struct {

	// Limit sets a hard limit on the number of issues to display
	Limit int

	// Reverse indicates that the issues should be listed in reverse order
	Reverse bool

	// DateFmt is the date format to use for displaying dates
	DateFmt string

	// PostGetter is the function used to get issue posts
	PostGetter plumbing2.PostGetter

	// PagerWrite is the function used to write to a pager
	PagerWrite common2.PagerWriter

	// Format specifies a format to use for generating each post output to Stdout.
	// The following place holders are supported:
	// - %i    	- Index of the post
	// - %a 	- Author of the post
	// - %e 	- Author email
	// - %t 	- Title of the post
	// - %c 	- The body/preview of the post
	// - %d 	- Date of creation
	// - %H    	- The full hash of the first comment
	// - %h    	- The short hash of the first comment
	// - %n  	- The reference name of the post
	// - %pk 	- The push key address
	Format string

	// NoPager indicates that output must not be piped into a pager
	NoPager bool

	StdOut io.Writer
	StdErr io.Writer
}

type IssueReadArgs

type IssueReadArgs struct {

	// Reference is the full reference path to the issue
	Reference string

	// Limit sets a hard limit on the number of issues to display
	Limit int

	// Reverse indicates that the issues should be listed in reverse order
	Reverse bool

	// DateFmt is the date format to use for displaying dates
	DateFmt string

	// PostGetter is the function used to get issue posts
	PostGetter plumbing2.PostGetter

	// PagerWrite is the function used to write to a pager
	PagerWrite common.PagerWriter

	// Format specifies a format to use for generating each comment output to Stdout.
	// The following place holders are supported:
	// - %i    	- Index of the comment
	// - %a 	- Author of the comment
	// - %e 	- Author email
	// - %t 	- Title of the comment
	// - %c 	- The body of the comment
	// - %d 	- Date of creation
	// - %H    	- The full hash of the comment
	// - %h    	- The short hash of the comment
	// - %n  	- The reference name of the post
	// - %l 	- The label attached to the comment
	// - %as 	- The assignees attached to the comment
	// - %r 	- The short commit hash the current comment is replying to.
	// - %R 	- The full commit hash the current comment is replying to.
	// - %rs 	- The comment's reactions.
	// - %pk 	- The push key address
	// - %cl 	- Flag for close status of the post (true/false)
	Format string

	// NoPager indicates that output must not be piped into a pager
	NoPager bool

	// NoCloseStatus indicates that the close status must not be rendered
	NoCloseStatus bool

	StdOut io.Writer
	StdErr io.Writer
}

IssueReadArgs contains arguments used by IssueReadCmd function

type IssueReopenArgs

type IssueReopenArgs struct {

	// Reference is the full reference path to the merge request
	Reference string

	// PostCommentCreator is the post commit creating function
	PostCommentCreator plumbing.PostCommitCreator

	// ReadPostBody is a function for reading post body in a commit
	ReadPostBody plumbing.PostBodyReader

	// Force indicates that uncommitted changes should be ignored
	Force bool
}

IssueReopenArgs contains parameters for IssueReopenCmd

type IssueStatusArgs

type IssueStatusArgs struct {

	// Reference is the full reference path to the issue
	Reference string

	// ReadPostBody is a function for reading post body in a commit
	ReadPostBody plumbing.PostBodyReader

	StdOut io.Writer
}

IssueStatusArgs contains parameters for IssueStatusCmd

Jump to

Keyboard shortcuts

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