diff --git a/_site/content/posts/modules/gerrit.md b/_site/content/posts/modules/gerrit.md index e2b4837e..1b9fd1be 100644 --- a/_site/content/posts/modules/gerrit.md +++ b/_site/content/posts/modules/gerrit.md @@ -4,8 +4,6 @@ date: 2018-06-27T15:55:42-07:00 draft: false --- -gerrit screenshot - Displays information about your projects hosted on Gerrit: #### Open Incoming Reviews @@ -16,17 +14,14 @@ All open reviews that are requesting your approval. All open reviews created by you. +gerrit screenshot + ## Source Code ```bash wtf/gerrit/ ``` -## Required ENV Variables - -Key: `WTF_GERRIT_PASSWORD`
-Action: Your Gerrit HTTP Password. - ## Keyboard Commands Key: `/`
@@ -59,6 +54,7 @@ gerrit: projects: - org/test-project" - dotfiles + password: "mypassword" username: "myname" verifyServerCertificate: false ``` @@ -83,8 +79,11 @@ Values: A valid URI. `projects`
A list of Gerrit project names to fetch data for.
+`password`
+Value: Your Gerrit HTTP Password. + `username`
-Your Gerrit username.
+Your Gerrit username. `verifyServerCertificate`
_Optional_
diff --git a/_site/static/imgs/modules/gerrit.png b/_site/static/imgs/modules/gerrit.png index 6084dc1d..8b472e5c 100644 Binary files a/_site/static/imgs/modules/gerrit.png and b/_site/static/imgs/modules/gerrit.png differ diff --git a/bamboohr/client.go b/bamboohr/client.go index 532342bd..1cebd95d 100644 --- a/bamboohr/client.go +++ b/bamboohr/client.go @@ -19,8 +19,6 @@ type Client struct { func NewClient(url string) *Client { client := Client{ apiBase: url, - //apiKey: os.Getenv("WTF_BAMBOO_HR_TOKEN"), - //subdomain: os.Getenv("WTF_BAMBOO_HR_SUBDOMAIN"), } client.loadAPICredentials() diff --git a/gerrit/widget.go b/gerrit/widget.go index 0f3f2095..bd87fef2 100644 --- a/gerrit/widget.go +++ b/gerrit/widget.go @@ -3,13 +3,14 @@ package gerrit import ( "crypto/tls" "fmt" + "net/http" + "os" + "regexp" + glb "github.com/andygrunwald/go-gerrit" "github.com/gdamore/tcell" "github.com/rivo/tview" "github.com/senorprogrammer/wtf/wtf" - "net/http" - "os" - "regexp" ) const HelpText = ` @@ -43,7 +44,12 @@ var ( func NewWidget(app *tview.Application, pages *tview.Pages) *Widget { baseURL := wtf.Config.UString("wtf.mods.gerrit.domain") username := wtf.Config.UString("wtf.mods.gerrit.username") - password := os.Getenv("WTF_GERRIT_PASSWORD") + + password := wtf.Config.UString( + "wtf.mods.gerrit.password", + os.Getenv("WTF_GERRIT_PASSWORD"), + ) + verifyServerCertificate := wtf.Config.UBool("wtf.mods.gerrit.verifyServerCertificate", true) httpClient := &http.Client{Transport: &http.Transport{