1
0
Fork 0
forked from forgejo/forgejo

#12, API: list user repos, list repo hooks

This commit is contained in:
Unknwon 2014-11-13 02:32:18 -05:00
parent 8c9338a537
commit 8eb5120fbd
12 changed files with 315 additions and 37 deletions

View file

@ -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 (