From 1de431d9f669cee2335431543e670fb757861674 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Wed, 13 Jun 2018 02:36:40 -0700 Subject: [PATCH 1/2] Fix bad merge of the Gitlab module --- wtf.go | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/wtf.go b/wtf.go index 1f90eb433..d50e78d3c 100644 --- a/wtf.go +++ b/wtf.go @@ -21,15 +21,11 @@ import ( "github.com/senorprogrammer/wtf/gcal" "github.com/senorprogrammer/wtf/git" "github.com/senorprogrammer/wtf/github" -<<<<<<< HEAD -======= "github.com/senorprogrammer/wtf/gitlab" ->>>>>>> dlom-gitlab "github.com/senorprogrammer/wtf/gspreadsheets" "github.com/senorprogrammer/wtf/help" "github.com/senorprogrammer/wtf/ipapi" "github.com/senorprogrammer/wtf/ipinfo" - "github.com/senorprogrammer/wtf/ipapi" "github.com/senorprogrammer/wtf/jira" "github.com/senorprogrammer/wtf/newrelic" "github.com/senorprogrammer/wtf/opsgenie" @@ -196,17 +192,10 @@ func addWidget(app *tview.Application, pages *tview.Pages, widgetName string) { Widgets = append(Widgets, git.NewWidget(app, pages)) case "github": Widgets = append(Widgets, github.NewWidget(app, pages)) -<<<<<<< HEAD - case "gspreadsheets": - Widgets = append(Widgets, gspreadsheets.NewWidget()) -======= case "gitlab": Widgets = append(Widgets, gitlab.NewWidget(app, pages)) case "gspreadsheets": Widgets = append(Widgets, gspreadsheets.NewWidget()) - case "ipapi": - Widgets = append(Widgets, ipapi.NewWidget()) ->>>>>>> dlom-gitlab case "ipinfo": Widgets = append(Widgets, ipinfo.NewWidget()) case "ipapi": @@ -251,15 +240,10 @@ func makeWidgets(app *tview.Application, pages *tview.Pages) { gcal.Config = Config git.Config = Config github.Config = Config -<<<<<<< HEAD - gspreadsheets.Config = Config -======= gitlab.Config = Config gspreadsheets.Config = Config ipapi.Config = Config ->>>>>>> dlom-gitlab ipinfo.Config = Config - ipapi.Config = Config jira.Config = Config newrelic.Config = Config opsgenie.Config = Config @@ -275,7 +259,7 @@ func makeWidgets(app *tview.Application, pages *tview.Pages) { mods, _ := Config.Map("wtf.mods") for mod := range mods { - if enabled, _ := Config.Bool("wtf.mods." + mod + ".enabled"); enabled { + if enabled := Config.UBool("wtf.mods."+mod+".enabled", false); enabled { addWidget(app, pages, mod) } From 258f145228542f068831babc3d3f06e7484a34dd Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Wed, 13 Jun 2018 02:37:47 -0700 Subject: [PATCH 2/2] Generate new Gitlab module documentation --- docs/index.xml | 6 +++--- docs/posts/index.xml | 6 +++--- docs/posts/modules/gitlab/index.html | 6 ++++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/index.xml b/docs/index.xml index 4a67aa43c..df581d78c 100644 --- a/docs/index.xml +++ b/docs/index.xml @@ -62,13 +62,13 @@ position Where in the grid this module&rsquo;s widget will be displayed.Fri, 08 Jun 2018 13:14:11 -0700 https://wtfutil.com/posts/modules/gitlab/ - Displays information about your projects hosted on Gitlab: + Added in v0.0.8. +Displays information about your projects hosted on Gitlab: Open Approval Requests All open merge requests that are requesting your approval. Open Merge Requests All open merge requests created by you. Source Code wtf/gitlab/ Required ENV Variables Key: WTF_GITLAB_TOKEN Action: A Gitlab personal access token. Requires at least api access. Keyboard Commands Key: / Action: Open/close the widget&rsquo;s help window. -Key: h Action: Show the previous project. -Key: l Action: Show the next project. +Key: h Action: Show the previous project. diff --git a/docs/posts/index.xml b/docs/posts/index.xml index 357502993..0ecc040de 100644 --- a/docs/posts/index.xml +++ b/docs/posts/index.xml @@ -62,13 +62,13 @@ position Where in the grid this module&rsquo;s widget will be displayed.Fri, 08 Jun 2018 13:14:11 -0700 https://wtfutil.com/posts/modules/gitlab/ - Displays information about your projects hosted on Gitlab: + Added in v0.0.8. +Displays information about your projects hosted on Gitlab: Open Approval Requests All open merge requests that are requesting your approval. Open Merge Requests All open merge requests created by you. Source Code wtf/gitlab/ Required ENV Variables Key: WTF_GITLAB_TOKEN Action: A Gitlab personal access token. Requires at least api access. Keyboard Commands Key: / Action: Open/close the widget&rsquo;s help window. -Key: h Action: Show the previous project. -Key: l Action: Show the next project. +Key: h Action: Show the previous project. diff --git a/docs/posts/modules/gitlab/index.html b/docs/posts/modules/gitlab/index.html index b9ad34886..096390ec1 100644 --- a/docs/posts/modules/gitlab/index.html +++ b/docs/posts/modules/gitlab/index.html @@ -117,6 +117,10 @@

Gitlab

+

Added in v0.0.8.

+ +

gitlab screenshot

+

Displays information about your projects hosted on Gitlab:

Open Approval Requests

@@ -127,8 +131,6 @@

Open Merge Requests

All open merge requests created by you.

-

gitlab screenshot

-

Source Code

wtf/gitlab/

Required ENV Variables