webhook: sourcehut_builds: ask for access_token instead of authorization_header
This commit is contained in:
parent
3155e21cbb
commit
36f05e6f4e
6 changed files with 37 additions and 24 deletions
|
@ -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/*",
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue