-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
36 lines (30 loc) · 911 Bytes
/
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
31
32
33
34
35
36
package main
import "github.com/BurntSushi/toml"
type Config struct {
Users map[string]string `toml:"users"`
GitHub GithubConfig `toml:"github"`
Slack SlackConfig `toml:"slack"`
Unassign UnassignConfig `toml:"unassign"`
}
type GithubConfig struct {
Organization string `toml:"organization"`
Repos []string `toml:"repo"`
PrivateKey string `toml:"privateKey"`
AppID int64 `toml:"appId"`
InstallationID int64 `toml:"installationId"`
IgnoreLabels []string `toml:"ignoreLabels"`
}
type SlackConfig struct {
Token string `toml:"token"`
ErrlogChannel string `toml:"errlogChannel"`
}
type UnassignConfig struct {
DaysUntilWarning int `toml:"daysUntilWarning"`
DaysUntilUnassign int `toml:"daysUntilUnassign"`
}
func configure(config *Config) {
_, err := toml.DecodeFile("./config.toml", &config)
if err != nil {
panic(err)
}
}