 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- func AddMetadataToIssueParams(client *api.Client, baseRepo ghrepo.Interface, params map[string]interface{}, ...) error
- func ColorFuncForPR(pr api.PullRequest) func(string) string
- func ColorFuncForState(state string) func(string) string
- func ListHeader(repoName string, itemName string, matchCount int, totalMatchCount int, ...) string
- func ListURLWithQuery(listURL string, options FilterOptions) (string, error)
- func PRFromArgs(apiClient *api.Client, baseRepoFn func() (ghrepo.Interface, error), ...) (*api.PullRequest, ghrepo.Interface, error)
- func PrintHeader(w io.Writer, s string)
- func PrintMessage(w io.Writer, s string)
- func StateTitleWithColor(pr api.PullRequest) string
- func TitleBodySurvey(io *iostreams.IOStreams, editorCommand string, issueState *IssueMetadataState, ...) error
- func WithPrAndIssueQueryParams(baseURL, title, body string, assignees, labels, projects []string, ...) (string, error)
- type Action
- type Defaults
- type FilterOptions
- type IssueMetadataState
Constants ¶
      View Source
      
  
const ( IssueMetadata metadataStateType = iota PRMetadata )
Variables ¶
This section is empty.
Functions ¶
func ColorFuncForPR ¶
func ColorFuncForPR(pr api.PullRequest) func(string) string
func ColorFuncForState ¶
ColorFuncForState returns a color function for a PR/Issue state
func ListHeader ¶
func ListURLWithQuery ¶
func ListURLWithQuery(listURL string, options FilterOptions) (string, error)
func PRFromArgs ¶
func PRFromArgs(apiClient *api.Client, baseRepoFn func() (ghrepo.Interface, error), branchFn func() (string, error), remotesFn func() (context.Remotes, error), arg string) (*api.PullRequest, ghrepo.Interface, error)
PRFromArgs looks up the pull request from either the number/branch/URL argument or one belonging to the current branch
NOTE: this API isn't great, but is here as a compatibility layer between old-style and new-style commands
func PrintHeader ¶
func PrintMessage ¶
func StateTitleWithColor ¶
func StateTitleWithColor(pr api.PullRequest) string
func TitleBodySurvey ¶
func TitleBodySurvey(io *iostreams.IOStreams, editorCommand string, issueState *IssueMetadataState, apiClient *api.Client, repo ghrepo.Interface, providedTitle, providedBody string, defs Defaults, nonLegacyTemplatePaths []string, legacyTemplatePath *string, allowReviewers, allowMetadata bool) error
FIXME: this command has too many parameters and responsibilities
Types ¶
type FilterOptions ¶
type IssueMetadataState ¶
type IssueMetadataState struct {
	Type metadataStateType
	Body   string
	Title  string
	Action Action
	Metadata   []string
	Reviewers  []string
	Assignees  []string
	Labels     []string
	Projects   []string
	Milestones []string
	MetadataResult *api.RepoMetadataResult
}
    func (*IssueMetadataState) HasMetadata ¶
func (tb *IssueMetadataState) HasMetadata() bool
 Click to show internal directories. 
   Click to hide internal directories.