woodpecker/server
Josh Soref 12cbe15de0
Fix spelling: gitlab (#1411)
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>
2022-11-09 17:16:17 +01:00
..
api Spelling (#1405) 2022-11-09 08:12:17 +01:00
badges Rename build to pipeline in code (#1224) 2022-10-18 03:24:12 +02:00
cache Rename remote to forge (#1357) 2022-11-05 00:35:06 +01:00
ccmenu Rename build to pipeline in code (#1224) 2022-10-18 03:24:12 +02:00
cron Spelling (#1405) 2022-11-09 08:12:17 +01:00
forge Fix spelling: gitlab (#1411) 2022-11-09 17:16:17 +01:00
grpc Split and refactor (#1394) 2022-11-06 12:44:04 +01:00
logging Spelling (#1405) 2022-11-09 08:12:17 +01:00
model Spelling (#1405) 2022-11-09 08:12:17 +01:00
pipeline Split and refactor (#1394) 2022-11-06 12:44:04 +01:00
plugins Split and refactor (#1394) 2022-11-06 12:44:04 +01:00
pubsub Spelling (#1405) 2022-11-09 08:12:17 +01:00
queue Rename build to pipeline in code (#1224) 2022-10-18 03:24:12 +02:00
router Rename remote to forge (#1357) 2022-11-05 00:35:06 +01:00
store Spelling (#1405) 2022-11-09 08:12:17 +01:00
swagger Spelling (#1405) 2022-11-09 08:12:17 +01:00
web Rename remote to forge (#1357) 2022-11-05 00:35:06 +01:00
config.go Rename remote to forge (#1357) 2022-11-05 00:35:06 +01:00