webhook: sourcehut_builds: ask for access_token instead of authorization_header

This commit is contained in:
oliverpool 2024-04-08 17:51:39 +02:00
parent 3155e21cbb
commit 36f05e6f4e
6 changed files with 37 additions and 24 deletions

View file

@ -267,14 +267,12 @@ func TestWebhookForms(t *testing.T) {
}))
t.Run("sourcehut_builds/required", testWebhookForms("sourcehut_builds", session, map[string]string{
"payload_url": "https://sourcehut_builds.example.com",
"manifest_path": ".build.yml",
"visibility": "PRIVATE",
"authorization_header": "Bearer 123456",
"payload_url": "https://sourcehut_builds.example.com",
"manifest_path": ".build.yml",
"visibility": "PRIVATE",
"access_token": "123456",
}, map[string]string{
"authorization_header": "",
}, map[string]string{
"authorization_header": "token ",
"access_token": "",
}, map[string]string{
"manifest_path": "",
}, map[string]string{
@ -289,9 +287,9 @@ func TestWebhookForms(t *testing.T) {
"manifest_path": ".build.yml",
"visibility": "PRIVATE",
"secrets": "on",
"access_token": "123456",
"branch_filter": "srht/*",
"authorization_header": "Bearer 123456",
"branch_filter": "srht/*",
}))
}