| 32 | } |
| 33 | |
| 34 | func NewMonitorable(store *store.Store) *Monitorable { |
| 35 | m := &Monitorable{} |
| 36 | m.store = store |
| 37 | m.config = make(map[coreModels.VariantName]*githubConfig.Github) |
| 38 | |
| 39 | // Load core config from env |
| 40 | pkgMonitorable.LoadConfig(&m.config, githubConfig.Default) |
| 41 | |
| 42 | // Register Monitorable Tile in config manager |
| 43 | m.countTileEnabler = store.Registry.RegisterTile(api.GithubCountTileType, versions.MinimalVersion, m.GetVariantsNames()) |
| 44 | m.checksTileEnabler = store.Registry.RegisterTile(api.GithubChecksTileType, versions.MinimalVersion, m.GetVariantsNames()) |
| 45 | m.pullRequestTileEnabler = store.Registry.RegisterTile(api.GithubPullRequestTileType, versions.MinimalVersion, m.GetVariantsNames()) |
| 46 | m.pullRequestGeneratorEnabler = store.Registry.RegisterGenerator(api.GithubPullRequestTileType, versions.MinimalVersion, m.GetVariantsNames()) |
| 47 | |
| 48 | return m |
| 49 | } |
| 50 | |
| 51 | func (m *Monitorable) GetDisplayName() string { |
| 52 | return "GitHub" |