mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-23 17:00:30 +00:00
12cbe15de0
This is most of the GitLab changes that I dropped from #1405. As before, I'm happy to adjust things... <details><summary>Problematic Changes</summary> Fwiw, this is the part that causes the tests to break (I don't understand why, but I'm leaving this change out): ```patch commit 703cbe3ed398bf32535120ead733b80aa145c8db Author: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue Nov 8 17:09:06 2022 -0500 event?! -- this seems broken diff --git a/server/forge/gitlab/testdata/hooks.go b/server/forge/gitlab/testdata/hooks.go index 7d39306..e394afc 100644 --- a/server/forge/gitlab/testdata/hooks.go +++ b/server/forge/gitlab/testdata/hooks.go @@ -27,7 +27,7 @@ var ( ServiceHookHeaders = http.Header{ "Content-Type": []string{"application/json"}, "User-Agent": []string{"GitLab/14.3.0"}, - "X-Gitlab-Event": []string{"Service Hook"}, + "X-GitLab-Event": []string{"Service Hook"}, } ) diff --git a/shared/token/token.go b/shared/token/token.go index 3f15537..191e5ee 100644 --- a/shared/token/token.go +++ b/shared/token/token.go @@ -64,7 +64,7 @@ func ParseRequest(r *http.Request, fn SecretFunc) (*Token, error) { return parse(bearer, fn) } - token = r.Header.Get("X-Gitlab-Token") + token = r.Header.Get("X-GitLab-Token") if len(token) != 0 { return parse(token, fn) } ``` </details> Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com> |
||
---|---|---|
.. | ||
bitbucket | ||
bitbucketserver | ||
coding | ||
common | ||
gitea | ||
github | ||
gitlab | ||
gogs | ||
mocks | ||
types | ||
configFetcher.go | ||
configFetcher_test.go | ||
remote.go | ||
userSyncer.go |