Skip to content

Instantly share code, notes, and snippets.

@alhazmy13 alhazmy13/index.js

forked from MoOx/index.js
Created Feb 13, 2019
What would you like to do?
Export/import github labels
// go on you labels pages
// eg
// paste this script in your console
// copy the output and now you can import it using !
var labels = [];
.forEach(function(element) {
name: element.textContent.trim(),
// using style.backgroundColor might returns "rgb(...)"
color: element.getAttribute("style")
.replace("background-color:", "")
// github wants hex code only without # or ;
.replace(/^#/, "")
.replace(/;$/, "")
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
You can’t perform that action at this time.