mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Refactor Webhook + Add X-Hub-Signature (#16176)
This PR removes multiple unneeded fields from the `HookTask` struct and adds the two headers `X-Hub-Signature` and `X-Hub-Signature-256`. ## ⚠️ BREAKING ⚠️ * The `Secret` field is no longer passed as part of the payload. * "Breaking" change (or fix?): The webhook history shows the real called url and not the url registered in the webhook (`deliver.go`@129). Close #16115 Fixes #7788 Fixes #11755 Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
		@@ -25,9 +25,6 @@ var (
 | 
			
		||||
	_ PayloadConvertor = &DingtalkPayload{}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// SetSecret sets the dingtalk secret
 | 
			
		||||
func (d *DingtalkPayload) SetSecret(_ string) {}
 | 
			
		||||
 | 
			
		||||
// JSONPayload Marshals the DingtalkPayload to json
 | 
			
		||||
func (d *DingtalkPayload) JSONPayload() ([]byte, error) {
 | 
			
		||||
	json := jsoniter.ConfigCompatibleWithStandardLibrary
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user