Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
senorprogrammer authored Jun 13, 2018
2 parents 957214f + 258f145 commit 27a7b45
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 28 deletions.
6 changes: 3 additions & 3 deletions docs/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ position Where in the grid this module&amp;rsquo;s widget will be displayed.</de
<pubDate>Fri, 08 Jun 2018 13:14:11 -0700</pubDate>

<guid>https://wtfutil.com/posts/modules/gitlab/</guid>
<description>Displays information about your projects hosted on Gitlab:
<description>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&amp;rsquo;s help window.
Key: h Action: Show the previous project.
Key: l Action: Show the next project.</description>
Key: h Action: Show the previous project.</description>
</item>

<item>
Expand Down
6 changes: 3 additions & 3 deletions docs/posts/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ position Where in the grid this module&amp;rsquo;s widget will be displayed.</de
<pubDate>Fri, 08 Jun 2018 13:14:11 -0700</pubDate>

<guid>https://wtfutil.com/posts/modules/gitlab/</guid>
<description>Displays information about your projects hosted on Gitlab:
<description>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&amp;rsquo;s help window.
Key: h Action: Show the previous project.
Key: l Action: Show the next project.</description>
Key: h Action: Show the previous project.</description>
</item>

<item>
Expand Down
6 changes: 4 additions & 2 deletions docs/posts/modules/gitlab/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ <h1>Gitlab</h1>



<p>Added in <code>v0.0.8</code>.</p>

<p><img src="/imgs/modules/gitlab.png" width="640" height="384" alt="gitlab screenshot" /></p>

<p>Displays information about your projects hosted on Gitlab:</p>

<h4 id="open-approval-requests">Open Approval Requests</h4>
Expand All @@ -127,8 +131,6 @@ <h4 id="open-merge-requests">Open Merge Requests</h4>

<p>All open merge requests created by you.</p>

<p><img src="/imgs/modules/gitlab.png" width="640" height="384" alt="gitlab screenshot" /></p>

<h2 id="source-code">Source Code</h2>
<div class="highlight"><pre class="chroma"><code class="language-bash" data-lang="bash">wtf/gitlab/</code></pre></div>
<h2 id="required-env-variables">Required ENV Variables</h2>
Expand Down
24 changes: 4 additions & 20 deletions wtf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/jenkins"
"github.com/senorprogrammer/wtf/jira"
"github.com/senorprogrammer/wtf/newrelic"
Expand Down Expand Up @@ -197,21 +193,14 @@ 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, gspreadsheets.NewWidget())
case "ipapi":
Widgets = append(Widgets, ipapi.NewWidget())
>>>>>>> dlom-gitlab
case "ipinfo":
Widgets = append(Widgets, ipinfo.NewWidget())
case "ipapi":
Widgets = append(Widgets, ipapi.NewWidget())
case "jenkins":
Widgets = append(Widgets, jenkins.NewWidget())
case "jira":
Expand Down Expand Up @@ -254,16 +243,11 @@ 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
jenkins.Config = Config
jenkins.Config = Config
jira.Config = Config
newrelic.Config = Config
opsgenie.Config = Config
Expand All @@ -279,7 +263,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)
}

Expand Down

0 comments on commit 27a7b45

Please sign in to comment.