@@ -227,7 +227,7 @@ func issueList(cmd *cobra.Command, args []string) error {
227227 }
228228
229229 if web {
230- issueListURL := generateRepoURL (baseRepo , "issues" )
230+ issueListURL := ghrepo . GenerateRepoURL (baseRepo , "issues" )
231231 openURL , err := listURLWithQuery (issueListURL , filterOptions {
232232 entity : "issue" ,
233233 state : state ,
@@ -504,7 +504,7 @@ func issueCreate(cmd *cobra.Command, args []string) error {
504504 }
505505
506506 if isWeb , err := cmd .Flags ().GetBool ("web" ); err == nil && isWeb {
507- openURL := generateRepoURL (baseRepo , "issues/new" )
507+ openURL := ghrepo . GenerateRepoURL (baseRepo , "issues/new" )
508508 if title != "" || body != "" {
509509 milestone := ""
510510 if len (milestoneTitles ) > 0 {
@@ -582,7 +582,7 @@ func issueCreate(cmd *cobra.Command, args []string) error {
582582 }
583583
584584 if action == PreviewAction {
585- openURL := generateRepoURL (baseRepo , "issues/new" )
585+ openURL := ghrepo . GenerateRepoURL (baseRepo , "issues/new" )
586586 milestone := ""
587587 if len (milestoneTitles ) > 0 {
588588 milestone = milestoneTitles [0 ]
@@ -618,14 +618,6 @@ func issueCreate(cmd *cobra.Command, args []string) error {
618618 return nil
619619}
620620
621- func generateRepoURL (repo ghrepo.Interface , p string , args ... interface {}) string {
622- baseURL := fmt .Sprintf ("https://%s/%s/%s" , repo .RepoHost (), repo .RepoOwner (), repo .RepoName ())
623- if p != "" {
624- return baseURL + "/" + fmt .Sprintf (p , args ... )
625- }
626- return baseURL
627- }
628-
629621func addMetadataToIssueParams (client * api.Client , baseRepo ghrepo.Interface , params map [string ]interface {}, tb * issueMetadataState ) error {
630622 if ! tb .HasMetadata () {
631623 return nil
0 commit comments