Last active
June 27, 2019 09:52
-
-
Save vincevargadev/3a67306ad46332aa635702b0bbea7c20 to your computer and use it in GitHub Desktop.
Get all visible issues on GitHub and convert to string
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
// 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