MCPcopy Create free account
hub / github.com/monitoror/monitoror / NewMonitorable

Function NewMonitorable

monitorables/github/github.go:34–49  ·  view source on GitHub ↗
(store *store.Store)

Source from the content-addressed store, hash-verified

32}
33
34func 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
51func (m *Monitorable) GetDisplayName() string {
52 return "GitHub"

Callers 2

RegisterMonitorablesFunction · 0.92
TestNewMonitorableFunction · 0.70

Calls 3

GetVariantsNamesMethod · 0.95
RegisterTileMethod · 0.65
RegisterGeneratorMethod · 0.65

Tested by 1

TestNewMonitorableFunction · 0.56