Skip to content

Instantly share code, notes, and snippets.

@seiyria
Created September 9, 2018 03:32
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 seiyria/6e4ba9491834dee98a3d0cb08d5bbfdc to your computer and use it in GitHub Desktop.
Save seiyria/6e4ba9491834dee98a3d0cb08d5bbfdc to your computer and use it in GitHub Desktop.
const octokit = require('@octokit/rest')();
const snake = require('lodash.snakecase');
const fs = require('fs');
octokit.search.issues({
q: 'repo:landoftherair/landoftherair is:open'
})
.then(res => {
res.data.items.forEach(item => {
fs.writeFileSync(`issue-${item.number} (${snake(item.title)}).md`, item.body);
});
})
.catch(e => {
console.error(e);
});;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment