mirror of
https://github.com/go-gitea/gitea
synced 2025-07-08 03:27:19 +00:00
#12, API: list user repos, list repo hooks
This commit is contained in:
@ -27,6 +27,16 @@ const (
|
||||
FORM
|
||||
)
|
||||
|
||||
func (t HookContentType) Name() string {
|
||||
switch t {
|
||||
case JSON:
|
||||
return "json"
|
||||
case FORM:
|
||||
return "form"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// HookEvent represents events that will delivery hook.
|
||||
type HookEvent struct {
|
||||
PushOnly bool `json:"push_only"`
|
||||
@ -147,6 +157,16 @@ const (
|
||||
SLACK
|
||||
)
|
||||
|
||||
func (t HookTaskType) Name() string {
|
||||
switch t {
|
||||
case GOGS:
|
||||
return "gogs"
|
||||
case SLACK:
|
||||
return "slack"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type HookEventType string
|
||||
|
||||
const (
|
||||
|
Reference in New Issue
Block a user