Documentation
¶
Index ¶
- Constants
- func AddMetadataToIssueParams(client *api.Client, baseRepo ghrepo.Interface, params map[string]interface{}, ...) error
- func ColorForPR(pr api.PullRequest) string
- func ColorForState(state 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(io *iostreams.IOStreams, s string)
- func PrintMessage(io *iostreams.IOStreams, s string)
- func StateTitleWithColor(cs *iostreams.ColorScheme, 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 ColorForPR ¶ added in v1.2.1
func ColorForPR(pr api.PullRequest) string
func ColorForState ¶ added in v1.2.1
ColorForState returns a color constant 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(cs *iostreams.ColorScheme, 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.