mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Merge branch 'anandsudhir-skip-certificate-check-jira'
This commit is contained in:
commit
e5254fe154
@ -45,6 +45,7 @@ jira:
|
|||||||
project: "ProjectA"
|
project: "ProjectA"
|
||||||
refreshInterval: 900
|
refreshInterval: 900
|
||||||
username: "chris.cummer"
|
username: "chris.cummer"
|
||||||
|
verifyServerCertificate: true
|
||||||
```
|
```
|
||||||
|
|
||||||
### Multiple Jira Projects
|
### Multiple Jira Projects
|
||||||
@ -70,6 +71,7 @@ jira:
|
|||||||
project: ["ProjectA", "ProjectB"]
|
project: ["ProjectA", "ProjectB"]
|
||||||
refreshInterval: 900
|
refreshInterval: 900
|
||||||
username: "chris.cummer"
|
username: "chris.cummer"
|
||||||
|
verifyServerCertificate: true
|
||||||
```
|
```
|
||||||
|
|
||||||
### Attributes
|
### Attributes
|
||||||
@ -113,3 +115,8 @@ Values: A positive integer, `0..n`.
|
|||||||
|
|
||||||
`username` <br />
|
`username` <br />
|
||||||
Your Jira username. <br />
|
Your Jira username. <br />
|
||||||
|
|
||||||
|
`verifyServerCertificate` <br />
|
||||||
|
_Optional_ <br />
|
||||||
|
Determines whether or not the server's certificate chain and host name are verified. <br />
|
||||||
|
Values: `true`, `false`.
|
||||||
|
@ -266,8 +266,8 @@ Key: j Action: Select the next item in the list.</description>
|
|||||||
<description>Displays all Jira issues assigned to you for the specified project.
|
<description>Displays all Jira issues assigned to you for the specified project.
|
||||||
Source Code wtf/jira/ Required ENV Variables Key: WTF_JIRA_API_KEY Value: Your Jira API key.
|
Source Code wtf/jira/ Required ENV Variables Key: WTF_JIRA_API_KEY Value: Your Jira API key.
|
||||||
Keyboard Commands None.
|
Keyboard Commands None.
|
||||||
Configuration Single Jira Project jira:colors:rows:even:&#34;lightblue&#34;odd:&#34;white&#34;domain:&#34;https://umbrellacorp.atlassian.net&#34;email:&#34;chriscummer@me.com&#34;enabled:truejql:&#34;issueType = Story&#34;position:top:4left:1height:1width:2project:&#34;ProjectA&#34;refreshInterval:900username:&#34;chris.cummer&#34; Multiple Jira Projects If you want to monitor multiple Jira projects, use the following configuration (note the difference in project):
|
Configuration Single Jira Project jira:colors:rows:even:&#34;lightblue&#34;odd:&#34;white&#34;domain:&#34;https://umbrellacorp.atlassian.net&#34;email:&#34;chriscummer@me.com&#34;enabled:truejql:&#34;issueType = Story&#34;position:top:4left:1height:1width:2project:&#34;ProjectA&#34;refreshInterval:900username:&#34;chris.cummer&#34;verifyServerCertificate:true Multiple Jira Projects If you want to monitor multiple Jira projects, use the following configuration (note the difference in project):
|
||||||
jira:colors:rows:even:&#34;lightblue&#34;odd:&#34;white&#34;domain:&#34;https://umbrellacorp.atlassian.net&#34;email:&#34;chriscummer@me.com&#34;enabled:truejql:&#34;issueType = Story&#34;position:top:4left:1height:1width:2project:[&#34;ProjectA&#34;,&#34;ProjectB&#34;]refreshInterval:900username:&#34;chris.cummer&#34; Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.</description>
|
jira:colors:rows:even:&#34;lightblue&#34;odd:&#34;white&#34;domain:&#34;https://umbrellacorp.atlassian.net&#34;email:&#34;chriscummer@me.com&#34;enabled:truejql:&#34;issueType = Story&#34;position:top:4left:1height:1width:2project:[&#34;ProjectA&#34;,&#34;ProjectB&#34;]refreshInterval:900username:&#34;chris.cummer&#34;verifyServerCertificate:true Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.</description>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
|
@ -266,8 +266,8 @@ Key: j Action: Select the next item in the list.</description>
|
|||||||
<description>Displays all Jira issues assigned to you for the specified project.
|
<description>Displays all Jira issues assigned to you for the specified project.
|
||||||
Source Code wtf/jira/ Required ENV Variables Key: WTF_JIRA_API_KEY Value: Your Jira API key.
|
Source Code wtf/jira/ Required ENV Variables Key: WTF_JIRA_API_KEY Value: Your Jira API key.
|
||||||
Keyboard Commands None.
|
Keyboard Commands None.
|
||||||
Configuration Single Jira Project jira:colors:rows:even:&#34;lightblue&#34;odd:&#34;white&#34;domain:&#34;https://umbrellacorp.atlassian.net&#34;email:&#34;chriscummer@me.com&#34;enabled:truejql:&#34;issueType = Story&#34;position:top:4left:1height:1width:2project:&#34;ProjectA&#34;refreshInterval:900username:&#34;chris.cummer&#34; Multiple Jira Projects If you want to monitor multiple Jira projects, use the following configuration (note the difference in project):
|
Configuration Single Jira Project jira:colors:rows:even:&#34;lightblue&#34;odd:&#34;white&#34;domain:&#34;https://umbrellacorp.atlassian.net&#34;email:&#34;chriscummer@me.com&#34;enabled:truejql:&#34;issueType = Story&#34;position:top:4left:1height:1width:2project:&#34;ProjectA&#34;refreshInterval:900username:&#34;chris.cummer&#34;verifyServerCertificate:true Multiple Jira Projects If you want to monitor multiple Jira projects, use the following configuration (note the difference in project):
|
||||||
jira:colors:rows:even:&#34;lightblue&#34;odd:&#34;white&#34;domain:&#34;https://umbrellacorp.atlassian.net&#34;email:&#34;chriscummer@me.com&#34;enabled:truejql:&#34;issueType = Story&#34;position:top:4left:1height:1width:2project:[&#34;ProjectA&#34;,&#34;ProjectB&#34;]refreshInterval:900username:&#34;chris.cummer&#34; Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.</description>
|
jira:colors:rows:even:&#34;lightblue&#34;odd:&#34;white&#34;domain:&#34;https://umbrellacorp.atlassian.net&#34;email:&#34;chriscummer@me.com&#34;enabled:truejql:&#34;issueType = Story&#34;position:top:4left:1height:1width:2project:[&#34;ProjectA&#34;,&#34;ProjectB&#34;]refreshInterval:900username:&#34;chris.cummer&#34;verifyServerCertificate:true Attributes colors.rows.even Define the foreground color for even-numbered rows. Values: Any X11 color name.</description>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
|
@ -153,7 +153,8 @@
|
|||||||
</span><span class="w"> </span>width<span class="p">:</span><span class="w"> </span><span class="m">2</span><span class="w">
|
</span><span class="w"> </span>width<span class="p">:</span><span class="w"> </span><span class="m">2</span><span class="w">
|
||||||
</span><span class="w"> </span>project<span class="p">:</span><span class="w"> </span><span class="s2">"ProjectA"</span><span class="w">
|
</span><span class="w"> </span>project<span class="p">:</span><span class="w"> </span><span class="s2">"ProjectA"</span><span class="w">
|
||||||
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">900</span><span class="w">
|
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">900</span><span class="w">
|
||||||
</span><span class="w"> </span>username<span class="p">:</span><span class="w"> </span><span class="s2">"chris.cummer"</span></code></pre></div>
|
</span><span class="w"> </span>username<span class="p">:</span><span class="w"> </span><span class="s2">"chris.cummer"</span><span class="w">
|
||||||
|
</span><span class="w"> </span>verifyServerCertificate<span class="p">:</span><span class="w"> </span><span class="kc">true</span></code></pre></div>
|
||||||
<h3 id="multiple-jira-projects">Multiple Jira Projects</h3>
|
<h3 id="multiple-jira-projects">Multiple Jira Projects</h3>
|
||||||
|
|
||||||
<p>If you want to monitor multiple Jira projects, use the following
|
<p>If you want to monitor multiple Jira projects, use the following
|
||||||
@ -174,7 +175,8 @@ configuration (note the difference in <code>project</code>):</p>
|
|||||||
</span><span class="w"> </span>width<span class="p">:</span><span class="w"> </span><span class="m">2</span><span class="w">
|
</span><span class="w"> </span>width<span class="p">:</span><span class="w"> </span><span class="m">2</span><span class="w">
|
||||||
</span><span class="w"> </span>project<span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"ProjectA"</span><span class="p">,</span><span class="w"> </span><span class="s2">"ProjectB"</span><span class="p">]</span><span class="w">
|
</span><span class="w"> </span>project<span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">"ProjectA"</span><span class="p">,</span><span class="w"> </span><span class="s2">"ProjectB"</span><span class="p">]</span><span class="w">
|
||||||
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">900</span><span class="w">
|
</span><span class="w"> </span>refreshInterval<span class="p">:</span><span class="w"> </span><span class="m">900</span><span class="w">
|
||||||
</span><span class="w"> </span>username<span class="p">:</span><span class="w"> </span><span class="s2">"chris.cummer"</span></code></pre></div>
|
</span><span class="w"> </span>username<span class="p">:</span><span class="w"> </span><span class="s2">"chris.cummer"</span><span class="w">
|
||||||
|
</span><span class="w"> </span>verifyServerCertificate<span class="p">:</span><span class="w"> </span><span class="kc">true</span></code></pre></div>
|
||||||
<h3 id="attributes">Attributes</h3>
|
<h3 id="attributes">Attributes</h3>
|
||||||
|
|
||||||
<p><code>colors.rows.even</code> <br />
|
<p><code>colors.rows.even</code> <br />
|
||||||
@ -217,6 +219,11 @@ Values: A positive integer, <code>0..n</code>.</p>
|
|||||||
<p><code>username</code> <br />
|
<p><code>username</code> <br />
|
||||||
Your Jira username. <br /></p>
|
Your Jira username. <br /></p>
|
||||||
|
|
||||||
|
<p><code>verifyServerCertificate</code> <br />
|
||||||
|
<em>Optional</em> <br />
|
||||||
|
Determines whether or not the server’s certificate chain and host name are verified. <br />
|
||||||
|
Values: <code>true</code>, <code>false</code>.</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
@ -2,6 +2,7 @@ package jira
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"crypto/tls"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
@ -60,7 +61,13 @@ func jiraRequest(path string) (*http.Response, error) {
|
|||||||
}
|
}
|
||||||
req.SetBasicAuth(Config.UString("wtf.mods.jira.email"), os.Getenv("WTF_JIRA_API_KEY"))
|
req.SetBasicAuth(Config.UString("wtf.mods.jira.email"), os.Getenv("WTF_JIRA_API_KEY"))
|
||||||
|
|
||||||
httpClient := &http.Client{}
|
verifyServerCertificate := Config.UBool("wtf.mods.jira.verifyServerCertificate", true)
|
||||||
|
httpClient := &http.Client{Transport: &http.Transport{
|
||||||
|
TLSClientConfig: &tls.Config{
|
||||||
|
InsecureSkipVerify: !verifyServerCertificate,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
resp, err := httpClient.Do(req)
|
resp, err := httpClient.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user