fix webhook url (#34186)

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
hiifong 2025-04-13 10:24:32 +08:00 committed by GitHub
parent f4196a8843
commit aada0370e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View File

@ -1,7 +1,7 @@
- -
id: 1 id: 1
repo_id: 1 repo_id: 1
url: www.example.com/url1 url: https://www.example.com/url1
content_type: 1 # json content_type: 1 # json
events: '{"push_only":true,"send_everything":false,"choose_events":false,"events":{"create":false,"push":true,"pull_request":false}}' events: '{"push_only":true,"send_everything":false,"choose_events":false,"events":{"create":false,"push":true,"pull_request":false}}'
is_active: true is_active: true
@ -9,7 +9,7 @@
- -
id: 2 id: 2
repo_id: 1 repo_id: 1
url: www.example.com/url2 url: https://www.example.com/url2
content_type: 1 # json content_type: 1 # json
events: '{"push_only":false,"send_everything":false,"choose_events":false,"events":{"create":false,"push":true,"pull_request":true}}' events: '{"push_only":false,"send_everything":false,"choose_events":false,"events":{"create":false,"push":true,"pull_request":true}}'
is_active: false is_active: false
@ -18,7 +18,7 @@
id: 3 id: 3
owner_id: 3 owner_id: 3
repo_id: 3 repo_id: 3
url: www.example.com/url3 url: https://www.example.com/url3
content_type: 1 # json content_type: 1 # json
events: '{"push_only":false,"send_everything":false,"choose_events":false,"events":{"create":false,"push":true,"pull_request":true}}' events: '{"push_only":false,"send_everything":false,"choose_events":false,"events":{"create":false,"push":true,"pull_request":true}}'
is_active: true is_active: true
@ -26,7 +26,7 @@
- -
id: 4 id: 4
repo_id: 2 repo_id: 2
url: www.example.com/url4 url: https://www.example.com/url4
content_type: 1 # json content_type: 1 # json
events: '{"push_only":true,"branch_filter":"{master,feature*}"}' events: '{"push_only":true,"branch_filter":"{master,feature*}"}'
is_active: true is_active: true
@ -35,7 +35,7 @@
id: 5 id: 5
repo_id: 0 repo_id: 0
owner_id: 0 owner_id: 0
url: www.example.com/url5 url: https://www.example.com/url5
content_type: 1 # json content_type: 1 # json
events: '{"push_only":true,"branch_filter":"{master,feature*}"}' events: '{"push_only":true,"branch_filter":"{master,feature*}"}'
is_active: true is_active: true
@ -45,7 +45,7 @@
id: 6 id: 6
repo_id: 0 repo_id: 0
owner_id: 0 owner_id: 0
url: www.example.com/url6 url: https://www.example.com/url6
content_type: 1 # json content_type: 1 # json
events: '{"push_only":true,"branch_filter":"{master,feature*}"}' events: '{"push_only":true,"branch_filter":"{master,feature*}"}'
is_active: true is_active: true

View File

@ -90,7 +90,7 @@ func TestWebhook_EventsArray(t *testing.T) {
func TestCreateWebhook(t *testing.T) { func TestCreateWebhook(t *testing.T) {
hook := &Webhook{ hook := &Webhook{
RepoID: 3, RepoID: 3,
URL: "www.example.com/unit_test", URL: "https://www.example.com/unit_test",
ContentType: ContentTypeJSON, ContentType: ContentTypeJSON,
Events: `{"push_only":false,"send_everything":false,"choose_events":false,"events":{"create":false,"push":true,"pull_request":true}}`, Events: `{"push_only":false,"send_everything":false,"choose_events":false,"events":{"create":false,"push":true,"pull_request":true}}`,
} }