diff --git a/command/issue.go b/command/issue.go index cd0c2dcee..8b5c4d6b4 100644 --- a/command/issue.go +++ b/command/issue.go @@ -418,7 +418,7 @@ func issueCreate(cmd *cobra.Command, args []string) error { } action := SubmitAction - tb := titleBody{ + tb := issueMetadataState{ Assignees: assignees, Labels: labelNames, Projects: projectNames, diff --git a/command/pr_create.go b/command/pr_create.go index d24a05277..29762de0b 100644 --- a/command/pr_create.go +++ b/command/pr_create.go @@ -200,7 +200,7 @@ func prCreate(cmd *cobra.Command, _ []string) error { } } - tb := titleBody{ + tb := issueMetadataState{ Reviewers: reviewers, Assignees: assignees, Labels: labelNames, diff --git a/command/title_body_survey.go b/command/title_body_survey.go index 9199d8015..f47e6a643 100644 --- a/command/title_body_survey.go +++ b/command/title_body_survey.go @@ -14,7 +14,7 @@ import ( type Action int -type titleBody struct { +type issueMetadataState struct { Body string Title string Action Action @@ -29,7 +29,7 @@ type titleBody struct { MetadataResult *api.RepoMetadataResult } -func (tb *titleBody) HasMetadata() bool { +func (tb *issueMetadataState) HasMetadata() bool { return len(tb.Reviewers) > 0 || len(tb.Assignees) > 0 || len(tb.Labels) > 0 || @@ -125,7 +125,7 @@ func selectTemplate(templatePaths []string) (string, error) { return string(templateContents), nil } -func titleBodySurvey(cmd *cobra.Command, data *titleBody, apiClient *api.Client, repo ghrepo.Interface, providedTitle, providedBody string, defs defaults, templatePaths []string, allowReviewers bool) error { +func titleBodySurvey(cmd *cobra.Command, data *issueMetadataState, apiClient *api.Client, repo ghrepo.Interface, providedTitle, providedBody string, defs defaults, templatePaths []string, allowReviewers bool) error { editorCommand := os.Getenv("GH_EDITOR") if editorCommand == "" { ctx := contextForCommand(cmd)