aboutsummaryrefslogtreecommitdiffstats
path: root/commands/bridge_auth_addtoken.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-02-29 15:04:48 +0100
committerMichael Muré <batolettre@gmail.com>2020-02-29 15:04:48 +0100
commitfe38af05a84abc15243bacf55a63f6f9aae37a33 (patch)
tree6a8d7b4db7eb7c9a1409ebc6bbec9c24a5faa411 /commands/bridge_auth_addtoken.go
parent68acfa519ab6656648d1e976db2a4190bbeb5f44 (diff)
downloadgit-bug-fe38af05a84abc15243bacf55a63f6f9aae37a33.tar.gz
github: correct casing for user provided login
Diffstat (limited to 'commands/bridge_auth_addtoken.go')
-rw-r--r--commands/bridge_auth_addtoken.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/commands/bridge_auth_addtoken.go b/commands/bridge_auth_addtoken.go
index 338b170e..8eda28ac 100644
--- a/commands/bridge_auth_addtoken.go
+++ b/commands/bridge_auth_addtoken.go
@@ -24,6 +24,12 @@ var (
)
func runBridgeTokenAdd(cmd *cobra.Command, args []string) error {
+ // Note: as bridgeAuthAddTokenLogin is not checked against the remote bug-tracker,
+ // it's possible to register a credential with an incorrect login (including bad case).
+ // The consequence is that it will not get picked later by the bridge. I find that
+ // checking it would require a cumbersome UX (need to provide a base URL for some bridges, ...)
+ // so it's probably not worth it, unless we refactor that entirely.
+
if bridgeAuthAddTokenTarget == "" {
return fmt.Errorf("flag --target is required")
}