Created
November 1, 2019 06:24
-
-
Save pissang/b4215b8068a2fb71edf0111fbdf1cc51 to your computer and use it in GitHub Desktop.
Github Milestone 2 Planitpoker
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
const fetch = require('node-fetch'); | |
const MILESTONE_NUMBER = 15; | |
function assembleIssues(issues) { | |
return issues.map(issue => { | |
if (issue.state === 'open') { | |
return '#' + issue.number + ' ' + issue.title; | |
} | |
}).filter(line => !!line).join('\n'); | |
} | |
fetch(`https://api.github.com/repos/apache/incubator-echarts/issues?milestone=${MILESTONE_NUMBER}`) | |
.then(res => res.json()) | |
.then(issues => { | |
console.log(assembleIssues(issues)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment