Use Survey For Interactions With User #186
No reviewers
Labels
No Label
kind/breaking
kind/bug
kind/build
kind/dependency
kind/deployment
kind/docs
kind
enhancement
kind
feature
kind/proposal
kind
question
kind
refactor
kind/security
kind/testing
kind/translation
priority/critical
priority/high
priority/low
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/has-backport
status/has-pull
status/needs-backport
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
upstream/sdk
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/tea#186
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "6543/tea:use-survey-for-interactions-with-user"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
2669822f59
to8aa8fe84aa
What's the advantage to use the library than before?
dont show password in terminal and better y/n prompts
can be used for multible choise to set labels on issues ...
Some suggestions.
Would it be in scope of this PR to also make use of survey in
runPullsCreate()
andrunReleaseCreate()
? I'd prefer that over introducing it halfway..@ -115,3 +116,3 @@
return err
}
name = strings.ReplaceAll(strings.Title(parsedURL.Host), ".", "")
nameSuggestion := strings.ReplaceAll(strings.Title(parsedURL.Host), ".", "")
gitea.com
.@ -122,3 +123,2 @@
}
if len(strings.TrimSpace(stdin)) != 0 {
name = strings.TrimSpace(stdin)
if len(name) != 0 {
this should be
== 0
?@ -129,1 +128,3 @@
stdin = ""
var hasToken bool
promptYN := &survey.Confirm{
Message: "Do you have a token",
Message: fmt.Sprintf("Access token (get it from %s/user/settings/applications)"
scratch that, i get it now. good idea to support both cases
Then please make it
"Do you have an access token?"
And I'd make the default
false
, chances are low that user creates a token first and then callstea login
@ -152,2 +154,2 @@
if _, err := fmt.Scanln(&stdin); err != nil {
stdin = ""
var optSettings bool
promptYN = &survey.Confirm{
I'm not sure if hiding sshkey & insecure flag is a good idea, it saves one just one prompt anyway..
As a user with non-standard ssh setup, the ssh setting will not be optional for me, and I'd likely miss it and wonder why tea isn't working properly..
at this module should be no prompts at all :/
6d25539251
to768ab64dbf
@noerw rebased and changed by your suggestions :)
EDIT: it still will need 👀 again from your side i thin ;)
i felt free to push to your branch directly.. ? lgtm now
@ -27,3 +30,3 @@
}
name, err := config.GenerateLoginName(giteaURL, "")
parsedURL, err := url.Parse(giteaURL)
you lost something here in the rebase.. please use
config.GenerateLoginName()
instead"Someone" added you to the fork to be able to do so, think it was intended ;)
noerw referenced this pull request2020-12-12 17:17:53 +00:00