Skip to content

Instantly share code, notes, and snippets.

@srgrn
Created November 4, 2013 06:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save srgrn/7298703 to your computer and use it in GitHub Desktop.
Save srgrn/7298703 to your computer and use it in GitHub Desktop.
a simple gist for testing how to work with jira rest api
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