mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Clean up the Jira module's API credentials loading
This commit is contained in:
parent
0a019ff836
commit
ddd3eb9625
@ -57,11 +57,17 @@ func buildJql(key string, value string) string {
|
||||
func jiraRequest(path string) (*http.Response, error) {
|
||||
url := fmt.Sprintf("%s%s", wtf.Config.UString("wtf.mods.jira.domain"), path)
|
||||
|
||||
apiKey := wtf.Config.UString(
|
||||
"wtf.mods.jira.apiKey",
|
||||
os.Getenv("WTF_JIRA_API_KEY"),
|
||||
)
|
||||
|
||||
req, err := http.NewRequest("GET", url, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.SetBasicAuth(wtf.Config.UString("wtf.mods.jira.email"), os.Getenv("WTF_JIRA_API_KEY"))
|
||||
//req.SetBasicAuth(wtf.Config.UString("wtf.mods.jira.email"), os.Getenv("WTF_JIRA_API_KEY"))
|
||||
req.SetBasicAuth(wtf.Config.UString("wtf.mods.jira.email"), apiKey)
|
||||
|
||||
verifyServerCertificate := wtf.Config.UBool("wtf.mods.jira.verifyServerCertificate", true)
|
||||
httpClient := &http.Client{Transport: &http.Transport{
|
||||
|
Loading…
x
Reference in New Issue
Block a user