[FEAT] sourcehut webhooks

This commit is contained in:
oliverpool 2024-03-13 16:49:48 +01:00
parent 04a398a1af
commit ed9dd0e62a
28 changed files with 890 additions and 13 deletions

View file

@ -115,6 +115,16 @@ type Repository struct {
RepoTransfer *RepoTransfer `json:"repo_transfer"`
}
// GetName implements the gitrepo.Repository interface
func (r Repository) GetName() string {
return r.Name
}
// GetOwnerName implements the gitrepo.Repository interface
func (r Repository) GetOwnerName() string {
return r.Owner.UserName
}
// CreateRepoOption options when creating repository
// swagger:model
type CreateRepoOption struct {

View file

@ -73,18 +73,19 @@ type HookType = string
// Types of webhooks
const (
FORGEJO HookType = "forgejo"
GITEA HookType = "gitea"
GOGS HookType = "gogs"
SLACK HookType = "slack"
DISCORD HookType = "discord"
DINGTALK HookType = "dingtalk"
TELEGRAM HookType = "telegram"
MSTEAMS HookType = "msteams"
FEISHU HookType = "feishu"
MATRIX HookType = "matrix"
WECHATWORK HookType = "wechatwork"
PACKAGIST HookType = "packagist"
FORGEJO HookType = "forgejo"
GITEA HookType = "gitea"
GOGS HookType = "gogs"
SLACK HookType = "slack"
DISCORD HookType = "discord"
DINGTALK HookType = "dingtalk"
TELEGRAM HookType = "telegram"
MSTEAMS HookType = "msteams"
FEISHU HookType = "feishu"
MATRIX HookType = "matrix"
WECHATWORK HookType = "wechatwork"
PACKAGIST HookType = "packagist"
SOURCEHUT_BUILDS HookType = "sourcehut_builds" //nolint:revive
)
// HookStatus is the status of a web hook