Created
May 14, 2016 22:21
-
-
Save ecasilla/0a70c16518aaed50a534bfa2bce750b0 to your computer and use it in GitHub Desktop.
Extract Github Issues Lables
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
// eg https://github.com/cssnext/cssnext/labels | |
// paste this script in your console | |
// copy the output and now you can import it using https://github.com/ecasilla/github-labelmaker ! | |
var labels = [].slice.call(document.querySelectorAll(".label-link")) | |
.map(function(ele) { | |
return { | |
name: ele.textContent.trim(), | |
color: ele.getAttribute("style") | |
.replace("background-color:", "") | |
.replace(/color:.*/,"") | |
.trim() | |
.replace(/^#/, "") | |
.replace(/;$/, "") | |
.trim(), | |
} | |
}); | |
console.log(JSON.stringify(labels, null, 2)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment