1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Clean up the GitLab module's API credentials loading

This commit is contained in:
Chris Cummer
2018-07-31 15:08:44 -07:00
parent dd4088d76e
commit ba38772760
2 changed files with 10 additions and 6 deletions

View File

@@ -34,9 +34,14 @@ type Widget struct {
}
func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
apiKey := os.Getenv("WTF_GITLAB_TOKEN")
apiKey := wtf.Config.UString(
"wtf.mods.gitlab.apiKey",
os.Getenv("WTF_GITLAB_TOKEN"),
)
baseURL := wtf.Config.UString("wtf.mods.gitlab.domain")
gitlab := glb.NewClient(nil, apiKey)
if baseURL != "" {
gitlab.SetBaseURL(baseURL)
}