Add interactive mode for tea issue create
#302
|
@ -16,7 +16,7 @@ func CreateIssue(login *config.Login, owner, repo string) error {
|
|||
var title, description string
|
||||
|
||||
// owner, repo
|
||||
owner, repo, err := PromptRepoSlug(owner, repo)
|
||||
owner, repo, err := promptRepoSlug(owner, repo)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@ func PromptPassword(name string) (pass string, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
// PromptRepoSlug interactively prompts for a Gitea repository or returns the current one
|
||||
func PromptRepoSlug(defaultOwner, defaultRepo string) (owner, repo string, err error) {
|
||||
// promptRepoSlug interactively prompts for a Gitea repository or returns the current one
|
||||
func promptRepoSlug(defaultOwner, defaultRepo string) (owner, repo string, err error) {
|
||||
YakoYakoYokuYoku marked this conversation as resolved
Outdated
|
||||
prompt := "Target repo:"
|
||||
required := true
|
||||
if len(defaultOwner) != 0 && len(defaultRepo) != 0 {
|
||||
|
|
|
@ -17,7 +17,7 @@ func CreatePull(login *config.Login, owner, repo string) error {
|
|||
var base, head, title, description string
|
||||
|
||||
// owner, repo
|
||||
owner, repo, err := PromptRepoSlug(owner, repo)
|
||||
owner, repo, err := promptRepoSlug(owner, repo)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user
do we have to export it?
@YakoYakoYokuYoku nice work, just one nit
exporting this function is not needed if it is only used in the same module
Gotcha