Created
November 4, 2013 06:14
-
-
Save srgrn/7298703 to your computer and use it in GitHub Desktop.
a simple gist for testing how to work with jira rest api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://docs.atlassian.com/jira/REST/latest/ | |
var files = [], | |
tickets =[]; | |
var finishrun = false; | |
var request = require('request'); | |
while(!finishrun){ | |
var result; | |
request('https://jira.atlassian.com/rest/api/2/search/',function (error, response, body) { | |
if (!error && response.statusCode == 200) { | |
result = JSON.parse(body) | |
for (var i = result.maxResults - 1; i >= 0; i--) { | |
request(result.issues[i].self,function(error,response,body) { | |
var issue = JSON.parse(body); | |
console.log(issue.fields) | |
}); | |
}; | |
} | |
}) | |
finishrun = true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment