Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Commit

Permalink
feat(plugins): allow plugins to use cookie in custom header
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Garant committed Oct 13, 2019
1 parent a227cc4 commit fd9865a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/rest-api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,20 @@ class RestApiClient {

let options = this.options

// Cookie useful to help you bypass SSO like OKTA
// After logging into the browser with Jira, you can
// copy and paste your cookie into ~/.gh.json
// plugins": { "jira": { "cookie": "longcookie", ...} }
const cookie = options.cookie
? {
headers: {
Cookie: options.cookie,
},
}
: {}

let p = {
...cookie,
method,
strictSSL: options.strictSSL,
uri: this.url(path),
Expand Down

0 comments on commit fd9865a

Please sign in to comment.