Skip to content

Instantly share code, notes, and snippets.

@vincevargadev
Last active June 27, 2019 09:52
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 vincevargadev/3a67306ad46332aa635702b0bbea7c20 to your computer and use it in GitHub Desktop.
Save vincevargadev/3a67306ad46332aa635702b0bbea7c20 to your computer and use it in GitHub Desktop.
Get all visible issues on GitHub and convert to string
// This script transforms all visible issues on the current screen to a string.
// Handy, when you need to reference issues on platforms without GitHub integration.
// Just filter your issues, copy the script to your console, and voila.
(function () {
function issueRowToString($row) {
const id = $row.id.replace('issue_', '#');
const $title = $row.querySelector('[data-hovercard-type="issue"]');
const name = $title.innerText;
const url = $title.href;
return `* ${id}: ${name} ${url}`;
}
const str = Array.from(document.querySelectorAll('.Box-row'))
.map(issueRowToString)
.join('\n');
console.log(str);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment