Enhance joinURL and return error on gitea client on start instead while running#88

Merged
6543 merged 8 commits from advanced-joinURL into main 2022-06-13 20:07:33 +02:00
Contributor
No description provided.
6543 added this to the v3.0 milestone 2022-06-11 23:21:13 +02:00
more coverage
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
c00fb87ae9
well we have to copy...
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
a9f63de328
6543 changed title from WIP: Enhance joinURL and return error on gitea client on start instead while running to Enhance joinURL and return error on gitea client on start instead while running 2022-06-11 23:54:39 +02:00
6543 requested review from crystal 2022-06-11 23:54:51 +02:00
crapStone approved these changes 2022-06-11 23:59:08 +02:00
Member

It looks like adding the result of path.Join to b.Path is causing GiteaRawContent to break because it converts ?ref= to %!F(MISSING)ref=. That's why the redirect test is failing, GiteaRawContent is producing a bad request when it looks for the .domains file.

It looks like adding the result of `path.Join` to `b.Path` is causing `GiteaRawContent` to break because it converts `?ref=` to `%!F(MISSING)ref=`. That's why the redirect test is failing, `GiteaRawContent` is producing a bad request when it looks for the `.domains` file.
Author
Contributor

noticed :D good to finaly have integration tests I would say

noticed :D good to finaly have integration tests I would say
6543 changed title from Enhance joinURL and return error on gitea client on start instead while running to WIP: Enhance joinURL and return error on gitea client on start instead while running 2022-06-12 03:45:56 +02:00
Merge branch 'main' into advanced-joinURL
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed
ba42ca893c
crapStone requested changes 2022-06-12 22:06:51 +02:00
Dismissed
@ -17,3 +17,3 @@
type Client struct {
giteaRoot string
giteaRoot *url.URL
Owner

What is the benefit of changing the string to URL when fasthttp uses strings for URLs anyway?

What is the benefit of changing the string to URL when fasthttp uses strings for URLs anyway?
Author
Contributor

we do have to parce it once and if there is an issue, pages server will fail srtaight on start and not have broken websites

we do have to parce it once and if there is an issue, pages server will fail srtaight on start and not have broken websites
Author
Contributor

the main reason is, that i like to utilize the url.Parse() func to alter and build query urls

the main reason is, that i like to utilize the url.Parse() func to alter and build query urls
Author
Contributor

changed as implementation of joinPath changed

changed as implementation of joinPath changed
6543 marked this conversation as resolved
6543 changed title from WIP: Enhance joinURL and return error on gitea client on start instead while running to Enhance joinURL and return error on gitea client on start instead while running 2022-06-13 15:15:26 +02:00
6543 requested review from crapStone 2022-06-13 15:15:29 +02:00
Member

fwiw the net/url package is getting a JoinPath function in Go 1.19 which can probably be used here instead, but for now we'll need this.

https://github.com/golang/go/issues/47005

fwiw the `net/url` package is getting a `JoinPath` function in Go 1.19 which can probably be used here instead, but for now we'll need this. https://github.com/golang/go/issues/47005
crystal approved these changes 2022-06-13 16:11:11 +02:00
Author
Contributor

nice to know, I'll add a todo mark

nice to know, I'll add a todo mark
add todo note for golang version bump
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
565aba63ee
6543 removed review request for crapStone 2022-06-13 18:59:52 +02:00
6543 dismissed crapStone's review 2022-06-13 19:00:04 +02:00
Reason:

outdated

Author
Contributor

ok that'S an interesting bug within gitea.

if you lgtm and the reject. afterwards you dismiss the review you have a lgtm again :O

ok that'S an interesting bug within gitea. if you lgtm and the reject. afterwards you dismiss the review you have a lgtm again :O
6543 merged commit cc32bab31f into main 2022-06-13 20:07:33 +02:00
6543 deleted branch advanced-joinURL 2022-06-13 20:07:33 +02:00
Sign in to join this conversation.
No description provided.