Fix pr create regression (#6472)
* Revert "Refactor to use new git client (#6447)"
This reverts commit 57fbe4f317.
* Fix pr create regression
This commit is contained in:
parent
57fbe4f317
commit
2cefb9fa59
44 changed files with 446 additions and 483 deletions
|
|
@ -6,7 +6,9 @@ import (
|
|||
|
||||
"github.com/AlecAivazis/survey/v2"
|
||||
"github.com/cli/cli/v2/api"
|
||||
"github.com/cli/cli/v2/git"
|
||||
"github.com/cli/cli/v2/internal/ghrepo"
|
||||
"github.com/cli/cli/v2/pkg/githubtemplate"
|
||||
"github.com/cli/cli/v2/pkg/iostreams"
|
||||
"github.com/cli/cli/v2/pkg/prompt"
|
||||
"github.com/cli/cli/v2/pkg/surveyext"
|
||||
|
|
@ -367,3 +369,18 @@ func MetadataSurvey(io *iostreams.IOStreams, baseRepo ghrepo.Interface, fetcher
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
func FindTemplates(dir, path string) ([]string, string) {
|
||||
if dir == "" {
|
||||
rootDir, err := git.ToplevelDir()
|
||||
if err != nil {
|
||||
return []string{}, ""
|
||||
}
|
||||
dir = rootDir
|
||||
}
|
||||
|
||||
templateFiles := githubtemplate.FindNonLegacy(dir, path)
|
||||
legacyTemplate := githubtemplate.FindLegacy(dir, path)
|
||||
|
||||
return templateFiles, legacyTemplate
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue