Skip to content

Commit

Permalink
**fix** jira connector issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gioboa committed Nov 9, 2018
1 parent d316a7d commit 2a444ab
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/http/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ export class Jira implements IJira {
basic_auth: { username, password }
});

// custom event
// solve this issue -> https://github.com/floralvikings/jira-connector/issues/115
const customGetAllProjects = (opts: any, callback: any) => {
var options = this.jiraInstance.project.buildRequestOptions(opts, '', 'GET');
if (Object.keys(options.body).length === 0) {
delete options.body;
}
if (Object.keys(options.qs).length === 0) {
delete options.qs;
}
return this.jiraInstance.makeRequest(options, callback);
};
this.jiraInstance.project.getAllProjects = customGetAllProjects;

/* code for oauth copy from -> https://www.npmjs.com/package/jira-connector
this.jiraInstance = new jiraClient({
host: 'jenjinstudios.atlassian.net',
Expand Down

0 comments on commit 2a444ab

Please sign in to comment.