Skip to content

Instantly share code, notes, and snippets.

@pissang
Created November 1, 2019 06:24
Show Gist options
  • Save pissang/b4215b8068a2fb71edf0111fbdf1cc51 to your computer and use it in GitHub Desktop.
Save pissang/b4215b8068a2fb71edf0111fbdf1cc51 to your computer and use it in GitHub Desktop.
Github Milestone 2 Planitpoker
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