Fix commit status events (#33320) (#33493)

Fix #32873
Fix #33201
~Fix #33244~
~Fix #33302~

depends on ~#33396~
backport #33320
This commit is contained in:
Lunny Xiao 2025-02-04 19:35:47 -08:00 committed by GitHub
parent 2746c6f1aa
commit 200cb6140d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 91 additions and 0 deletions

View file

@ -175,6 +175,12 @@ func (wc wechatworkConvertor) Package(p *api.PackagePayload) (WechatworkPayload,
return newWechatworkMarkdownPayload(text), nil
}
func (wc wechatworkConvertor) Status(p *api.CommitStatusPayload) (WechatworkPayload, error) {
text, _ := getStatusPayloadInfo(p, noneLinkFormatter, true)
return newWechatworkMarkdownPayload(text), nil
}
func newWechatworkRequest(_ context.Context, w *webhook_model.Webhook, t *webhook_model.HookTask) (*http.Request, []byte, error) {
var pc payloadConvertor[WechatworkPayload] = wechatworkConvertor{}
return newJSONRequest(pc, w, t, true)