Refactor addLoginMain() #201

Merged
6543 merged 10 commits from noerw/tea:refactor-loginMain into master 2020-09-30 19:44:25 +00:00
Member

As discussed in #186, we might also want to change the login-name generation from camelcase to the plain login hostname.
I find the latter much more readable and intuitive

As discussed in #186, we might also want to change the login-name generation from camelcase to the plain login hostname. I find the latter much more readable and intuitive
noerw added 1 commit 2020-09-26 13:44:43 +00:00
refactor addLoginMain()
Some checks failed
continuous-integration/drone/pr Build is failing
cbd365272f
noerw changed title from Refactor Loginmain to Refactor addLoginMain() 2020-09-26 13:54:11 +00:00
noerw added 1 commit 2020-09-26 14:01:19 +00:00
make linter happy
All checks were successful
continuous-integration/drone/pr Build is passing
2497be9a05
6543 added the
kind
refactor
label 2020-09-26 19:07:10 +00:00
6543 added this to the v0.6.0 milestone 2020-09-26 19:07:14 +00:00
lafriks reviewed 2020-09-29 12:44:37 +00:00
Dismissed
cmd/login.go Outdated
@ -279,3 +250,1 @@
}
}
t, _, err := client.CreateAccessToken(gitea.CreateAccessTokenOption{Name: tokenName})
if token == "" {
Member
	if len(token) == 0 {
```go if len(token) == 0 { ```
Owner

blocked by #206

blocked by #206
Owner

@noerw time to "resolve" conflicts

I think you can split away the token generation out of addLogin into "tasks" package (not in repo jet, but proposed by #184)

@noerw time to "resolve" conflicts I think you can split away the token generation out of addLogin into "tasks" package (not in repo jet, but proposed by #184)
noerw added 6 commits 2020-09-30 08:03:39 +00:00
noerw force-pushed refactor-loginMain from f0d628f367 to e78f4e1645 2020-09-30 08:04:24 +00:00 Compare
Author
Member

@6543 done.
I left token generation in the config package, as it seems reasonable to have it as a member method operating on Login

@6543 done. I left token generation in the config package, as it seems reasonable to have it as a member method operating on `Login`
noerw added 1 commit 2020-09-30 08:19:33 +00:00
drop noisy log line
All checks were successful
continuous-integration/drone/pr Build is passing
e24ad38312
must have been introduced recently?
6543 reviewed 2020-09-30 08:23:28 +00:00
Dismissed
@ -18,1 +19,4 @@
}
// NormalizeURL normalizes the input with a protocol
func NormalizeURL(raw string, insecure bool) (*url.URL, error) {
Owner

insecure mean to accept self-signed certificates, it's NOT about http vs https

insecure mean to accept self-signed certificates, it's NOT about http vs https
Author
Member

ok, I'd fall back to https then. If user wants http, they need to enter the url with protocol.

ok, I'd fall back to https then. If user wants `http`, they need to enter the url with protocol.
Author
Member

ok, I'd fall back to https then. If user wants http, they need to enter the url with protocol.

ok, I'd fall back to https then. If user wants `http`, they need to enter the url with protocol.
noerw added 1 commit 2020-09-30 08:59:31 +00:00
simplify NormalizeURL
All checks were successful
continuous-integration/drone/pr Build is passing
1b6f13463f
6543 approved these changes 2020-09-30 11:05:28 +00:00
Dismissed
6543 added the
status/needs-reviews
label 2020-09-30 11:05:40 +00:00
zeripath approved these changes 2020-09-30 19:24:09 +00:00
Dismissed
6543 merged commit de5a00e807 into master 2020-09-30 19:44:25 +00:00
6543 referenced this issue from a commit 2020-09-30 19:44:26 +00:00
6543 removed the
status/needs-reviews
label 2020-09-30 19:44:45 +00:00
noerw deleted branch refactor-loginMain 2020-10-02 11:25:13 +00:00
Sign in to join this conversation.
No description provided.