 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- func AddMetadataToIssueParams(client *api.Client, baseRepo ghrepo.Interface, params map[string]interface{}, ...) error
- func BodySurvey(state *IssueMetadataState, templateContent, editorCommand string) error
- func ColorForPR(pr api.PullRequest) string
- func ColorForState(state string) string
- func CommentList(io *iostreams.IOStreams, comments api.Comments) (string, error)
- func FillFromJSON(io *iostreams.IOStreams, recoverFile string, state *IssueMetadataState) error
- func FindTemplates(dir, path string) ([]string, string)
- func ListHeader(repoName string, itemName string, matchCount int, totalMatchCount int, ...) string
- func ListURLWithQuery(listURL string, options FilterOptions) (string, error)
- func MetadataSurvey(io *iostreams.IOStreams, baseRepo ghrepo.Interface, ...) error
- func PRFromArgs(apiClient *api.Client, baseRepoFn func() (ghrepo.Interface, error), ...) (*api.PullRequest, ghrepo.Interface, error)
- func PreserveInput(io *iostreams.IOStreams, state *IssueMetadataState, createErr *error) func()
- func PrintHeader(io *iostreams.IOStreams, s string)
- func PrintMessage(io *iostreams.IOStreams, s string)
- func RawCommentList(comments api.Comments) string
- func ReactionGroupList(rgs api.ReactionGroups) string
- func StateTitleWithColor(cs *iostreams.ColorScheme, pr api.PullRequest) string
- func TemplateSurvey(templateFiles []string, legacyTemplate string, state IssueMetadataState) (templateContent string, err error)
- func TitleSurvey(state *IssueMetadataState) error
- func WithPrAndIssueQueryParams(baseURL string, state IssueMetadataState) (string, error)
- type Action
- type FilterOptions
- type IssueMetadataState
- type MetadataFetcher
- type RepoMetadataFetcher
Constants ¶
      View Source
      
  
const ( IssueMetadata metadataStateType = iota PRMetadata )
Variables ¶
This section is empty.
Functions ¶
func BodySurvey ¶ added in v1.3.0
func BodySurvey(state *IssueMetadataState, templateContent, editorCommand string) error
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 CommentList ¶ added in v1.4.0
func FillFromJSON ¶ added in v1.3.0
func FillFromJSON(io *iostreams.IOStreams, recoverFile string, state *IssueMetadataState) error
func FindTemplates ¶ added in v1.3.0
func ListHeader ¶
func ListURLWithQuery ¶
func ListURLWithQuery(listURL string, options FilterOptions) (string, error)
func MetadataSurvey ¶ added in v1.3.0
func MetadataSurvey(io *iostreams.IOStreams, baseRepo ghrepo.Interface, fetcher RepoMetadataFetcher, state *IssueMetadataState) 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 PreserveInput ¶ added in v1.3.0
func PreserveInput(io *iostreams.IOStreams, state *IssueMetadataState, createErr *error) func()
func PrintHeader ¶
func PrintMessage ¶
func RawCommentList ¶ added in v1.4.0
func ReactionGroupList ¶ added in v1.4.0
func ReactionGroupList(rgs api.ReactionGroups) string
func StateTitleWithColor ¶
func StateTitleWithColor(cs *iostreams.ColorScheme, pr api.PullRequest) string
func TemplateSurvey ¶ added in v1.3.0
func TemplateSurvey(templateFiles []string, legacyTemplate string, state IssueMetadataState) (templateContent string, err error)
func TitleSurvey ¶ added in v1.3.0
func TitleSurvey(state *IssueMetadataState) error
func WithPrAndIssueQueryParams ¶
func WithPrAndIssueQueryParams(baseURL string, state IssueMetadataState) (string, error)
Types ¶
type FilterOptions ¶
type IssueMetadataState ¶
type IssueMetadataState struct {
	Type metadataStateType
	Draft bool
	Body  string
	Title string
	Metadata   []string
	Reviewers  []string
	Assignees  []string
	Labels     []string
	Projects   []string
	Milestones []string
	MetadataResult *api.RepoMetadataResult
	// contains filtered or unexported fields
}
    func (*IssueMetadataState) HasMetadata ¶
func (tb *IssueMetadataState) HasMetadata() bool
func (*IssueMetadataState) IsDirty ¶ added in v1.3.0
func (tb *IssueMetadataState) IsDirty() bool
func (*IssueMetadataState) MarkDirty ¶ added in v1.3.0
func (tb *IssueMetadataState) MarkDirty()
type MetadataFetcher ¶ added in v1.3.1
type MetadataFetcher struct {
	IO        *iostreams.IOStreams
	APIClient *api.Client
	Repo      ghrepo.Interface
	State     *IssueMetadataState
}
    func (*MetadataFetcher) RepoMetadataFetch ¶ added in v1.3.1
func (mf *MetadataFetcher) RepoMetadataFetch(input api.RepoMetadataInput) (*api.RepoMetadataResult, error)
type RepoMetadataFetcher ¶ added in v1.3.1
type RepoMetadataFetcher interface {
	RepoMetadataFetch(api.RepoMetadataInput) (*api.RepoMetadataResult, error)
}
     Click to show internal directories. 
   Click to hide internal directories.