-
Notifications
You must be signed in to change notification settings - Fork 3
/
Config.go
30 lines (26 loc) · 1.2 KB
/
Config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package structs
type Config struct {
Port string `json:"port"` // example: ":8080"
Endpoint string `json:"endpoint"` // endpoint where http server will listen for hooks
Listeners []Listener `json:"listeners"`
}
type Listener struct {
// required properties
Name string `json:"name"` // a unique name for the webhook
Repository string `json:"repository"` // the repository name in the format "username/repo-name"
Directory string `json:"directory"` // the directory in which the command will be run
Command string `json:"command"` // the command to run
// for your deployment, it is suggested to put the various commands
// in your scripts like in node.js or a .sh file, and execute it.
// additional filters
Secret string `json:"secret"`
Branch string `json:"branch"` // execute only if push is on this branch
AllowedPushers []string `json:"allowedPushers"` // execute only if pusher is one of these (username)
// notification options
NotifyDiscord bool `json:"notifyDiscord"`
Discord struct {
Webhook string `json:"webhook"`
NotifyBeforeRun bool `json:"notifyBeforeRun"`
SendOutput bool `json:"sendOutput"`
}
}