forked from forgejo/forgejo
[FEAT] sourcehut webhooks
This commit is contained in:
parent
04a398a1af
commit
ed9dd0e62a
28 changed files with 890 additions and 13 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"crypto/sha1"
|
||||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
|
@ -19,6 +20,8 @@ import (
|
|||
webhook_module "code.gitea.io/gitea/modules/webhook"
|
||||
)
|
||||
|
||||
var ErrPayloadTypeNotSupported = errors.New("unsupported webhook event")
|
||||
|
||||
// PayloadConvertor defines the interface to convert system payload to webhook payload
|
||||
type PayloadConvertor[T any] interface {
|
||||
Create(*api.CreatePayload) (T, error)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue