Implement forge addon #4662
Replies: 1 comment 3 replies
-
Yes, looks like a bug. That's the correct way to go, but it shouldn't fail if the user is |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have started developing a forge addon and it seems that I might be one of the firsts.
I am relying on Woodpecker-ci v2.8 and I have an issue with the login process. I get a panic error and digging it a bit further I realized that the issue originates from this code. In my case I return a nil User, a valid redirect URL and a nil error. However, the aforementioned code tries to convert the returned user and the redirect URL even if no user is provided. This fails with a panic error as expected.
Is this behavior the expected one? I see other forges to return this kind of values during the login:
https://github.com/woodpecker-ci/woodpecker/blob/release/v2.8/server/forge/forgejo/forgejo.go#L123
https://github.com/woodpecker-ci/woodpecker/blob/release/v2.8/server/forge/gitea/gitea.go#L120
https://github.com/woodpecker-ci/woodpecker/blob/release/v2.8/server/forge/gitlab/gitlab.go#L127
Should the implementation return a (dummy) user and the redirect URL? Or there is some sort of issue in the forge addon implementation?
Beta Was this translation helpful? Give feedback.
All reactions