chore: pkg imported more than once (#7591)
This commit is contained in:
parent
beb6234f96
commit
8587851202
2 changed files with 6 additions and 8 deletions
|
|
@ -11,7 +11,6 @@ import (
|
|||
"github.com/cli/cli/v2/internal/config"
|
||||
"github.com/cli/cli/v2/internal/ghrepo"
|
||||
"github.com/cli/cli/v2/internal/text"
|
||||
"github.com/cli/cli/v2/pkg/cmd/pr/shared"
|
||||
prShared "github.com/cli/cli/v2/pkg/cmd/pr/shared"
|
||||
"github.com/cli/cli/v2/pkg/cmdutil"
|
||||
"github.com/cli/cli/v2/pkg/iostreams"
|
||||
|
|
@ -143,7 +142,7 @@ func createRun(opts *CreateOptions) (err error) {
|
|||
milestones = []string{opts.Milestone}
|
||||
}
|
||||
|
||||
meReplacer := shared.NewMeReplacer(apiClient, baseRepo.RepoHost())
|
||||
meReplacer := prShared.NewMeReplacer(apiClient, baseRepo.RepoHost())
|
||||
assignees, err := meReplacer.ReplaceSlice(opts.Assignees)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -167,7 +166,7 @@ func createRun(opts *CreateOptions) (err error) {
|
|||
}
|
||||
}
|
||||
|
||||
tpl := shared.NewTemplateManager(httpClient, baseRepo, opts.Prompter, opts.RootDirOverride, !opts.HasRepoOverride, false)
|
||||
tpl := prShared.NewTemplateManager(httpClient, baseRepo, opts.Prompter, opts.RootDirOverride, !opts.HasRepoOverride, false)
|
||||
|
||||
if opts.WebMode {
|
||||
var openURL string
|
||||
|
|
@ -222,7 +221,7 @@ func createRun(opts *CreateOptions) (err error) {
|
|||
templateContent := ""
|
||||
|
||||
if opts.RecoverFile == "" {
|
||||
var template shared.Template
|
||||
var template prShared.Template
|
||||
|
||||
if opts.Template != "" {
|
||||
template, err = tpl.Select(opts.Template)
|
||||
|
|
@ -325,7 +324,7 @@ func createRun(opts *CreateOptions) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func generatePreviewURL(apiClient *api.Client, baseRepo ghrepo.Interface, tb shared.IssueMetadataState) (string, error) {
|
||||
func generatePreviewURL(apiClient *api.Client, baseRepo ghrepo.Interface, tb prShared.IssueMetadataState) (string, error) {
|
||||
openURL := ghrepo.GenerateRepoURL(baseRepo, "issues/new")
|
||||
return prShared.WithPrAndIssueQueryParams(apiClient, baseRepo, openURL, tb)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import (
|
|||
"github.com/cli/cli/v2/internal/ghrepo"
|
||||
"github.com/cli/cli/v2/internal/text"
|
||||
issueShared "github.com/cli/cli/v2/pkg/cmd/issue/shared"
|
||||
"github.com/cli/cli/v2/pkg/cmd/pr/shared"
|
||||
prShared "github.com/cli/cli/v2/pkg/cmd/pr/shared"
|
||||
"github.com/cli/cli/v2/pkg/cmdutil"
|
||||
"github.com/cli/cli/v2/pkg/iostreams"
|
||||
|
|
@ -133,7 +132,7 @@ func listRun(opts *ListOptions) error {
|
|||
}
|
||||
|
||||
issueState := strings.ToLower(opts.State)
|
||||
if issueState == "open" && shared.QueryHasStateClause(opts.Search) {
|
||||
if issueState == "open" && prShared.QueryHasStateClause(opts.Search) {
|
||||
issueState = ""
|
||||
}
|
||||
|
||||
|
|
@ -228,7 +227,7 @@ func issueList(client *http.Client, repo ghrepo.Interface, filters prShared.Filt
|
|||
}
|
||||
|
||||
var err error
|
||||
meReplacer := shared.NewMeReplacer(apiClient, repo.RepoHost())
|
||||
meReplacer := prShared.NewMeReplacer(apiClient, repo.RepoHost())
|
||||
filters.Assignee, err = meReplacer.Replace(filters.Assignee)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue