forked from forgejo/forgejo
#12, API: list user repos, list repo hooks
This commit is contained in:
parent
8c9338a537
commit
8eb5120fbd
12 changed files with 315 additions and 37 deletions
|
@ -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 (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue