mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 02:01:43 +03:00
commands: enhance flag description
bridge/github: improve configuration logic Co-Authored-By: Michael Muré <batolettre@gmail.com>
This commit is contained in:
parent
0381400bfd
commit
65d7ce7c05
@ -45,7 +45,7 @@ func (g *Github) Configure(repo repository.RepoCommon, params core.BridgeParams)
|
||||
var project string
|
||||
|
||||
if params.Token != "" &&
|
||||
!(params.URL != "" || (params.Project != "" && params.Owner != "")) {
|
||||
(params.URL == "" && (params.Project == "" || params.Owner == "")) {
|
||||
return nil, fmt.Errorf("you must provide a project URL or Owner/Name to configure this bridge with a token")
|
||||
}
|
||||
|
||||
|
@ -191,7 +191,7 @@ func init() {
|
||||
bridgeConfigureCmd.Flags().StringVarP(&bridgeParams.URL, "url", "u", "", "The URL of the target repository")
|
||||
bridgeConfigureCmd.Flags().StringVarP(&bridgeParams.Owner, "owner", "o", "", "The owner of the target repository")
|
||||
bridgeConfigureCmd.Flags().StringVarP(&bridgeParams.Token, "token", "T", "", "The authentication token for the API")
|
||||
bridgeConfigureCmd.Flags().BoolVar(&tokenStdin, "token-stdin", false, "Expect to receive token from stdin and ignore token flag.")
|
||||
bridgeConfigureCmd.Flags().BoolVar(&tokenStdin, "token-stdin", false, "Will read the token from stdin and ignore --token")
|
||||
bridgeConfigureCmd.Flags().StringVarP(&bridgeParams.Project, "project", "p", "", "The name of the target repository")
|
||||
bridgeConfigureCmd.Flags().SortFlags = false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user