Refactor addLoginMain() #201

Merged
6543 merged 10 commits from noerw/tea:refactor-loginMain into master 2 years ago
noerw commented 2 years ago
Collaborator

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 2 years ago
continuous-integration/drone/pr Build is failing Details
cbd365272f
refactor addLoginMain()
noerw changed title from Refactor Loginmain to Refactor addLoginMain() 2 years ago
noerw added 1 commit 2 years ago
continuous-integration/drone/pr Build is passing Details
2497be9a05
make linter happy
6543 added the kind/refactor label 2 years ago
6543 added this to the v0.6.0 milestone 2 years ago
lafriks reviewed 2 years ago
Dismissed
cmd/login.go Outdated
}
}
t, _, err := client.CreateAccessToken(gitea.CreateAccessTokenOption{Name: tokenName})
if token == "" {
Collaborator
	if len(token) == 0 {
```go if len(token) == 0 { ```
6543 commented 2 years ago
Collaborator

blocked by #206

blocked by #206
6543 commented 2 years ago
Collaborator

@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 2 years ago
noerw force-pushed refactor-loginMain from f0d628f367 to e78f4e1645 2 years ago
noerw commented 2 years ago
Poster
Collaborator

@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 2 years ago
continuous-integration/drone/pr Build is passing Details
e24ad38312
drop noisy log line
6543 reviewed 2 years ago
Dismissed
}
// NormalizeURL normalizes the input with a protocol
func NormalizeURL(raw string, insecure bool) (*url.URL, error) {
6543 commented 2 years ago
Collaborator

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
noerw commented 2 years ago
Poster
Collaborator

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 commented 2 years ago
Poster
Collaborator

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 2 years ago
continuous-integration/drone/pr Build is passing Details
1b6f13463f
simplify NormalizeURL
6543 approved these changes 2 years ago
Dismissed
6543 added the status/needs-reviews label 2 years ago
zeripath approved these changes 2 years ago
Dismissed
6543 merged commit de5a00e807 into master 2 years ago
6543 referenced this issue from a commit 2 years ago
6543 removed the status/needs-reviews label 2 years ago
noerw deleted branch refactor-loginMain 2 years ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as de5a00e807.
Sign in to join this conversation.
Loading…
There is no content yet.