Skip to content

Instantly share code, notes, and snippets.

@afresh1
Created June 4, 2016 23:35
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 afresh1/49bfb3a25f73f91e54f24ea5eb5b8609 to your computer and use it in GitHub Desktop.
Save afresh1/49bfb3a25f73f91e54f24ea5eb5b8609 to your computer and use it in GitHub Desktop.
Creates "Sane GitHub Labels", paste into the javascript console on the issue page for your project. https://medium.com/@dave_lunny/sane-github-labels-c5d2e6004b63
labels = [
{ "name": "Priority: Low", "color": "#009800" },
{ "name": "Priority: Medium", "color": "#fbca04" },
{ "name": "Priority: High", "color": "#eb6420" },
{ "name": "Priority: Critical", "color": "#e11d21" },
{ "name": "Status: Abandoned", "color": "#000000" },
{ "name": "Status: Accepted", "color": "#009800" },
{ "name": "Status: Available", "color": "#bfe5bf" },
{ "name": "Status: Blocked", "color": "#e11d21" },
{ "name": "Status: Completed", "color": "#006b75" },
{ "name": "Status: In Progress", "color": "#cccccc" },
{ "name": "Status: On Hold", "color": "#e11d21" },
{ "name": "Status: Pending", "color": "#fef2c0" },
{ "name": "Status: Review Needed", "color": "#fbca04" },
{ "name": "Status: Revision Needed", "color": "#e11d21" },
{ "name": "Type: Bug", "color": "#e11d21" },
{ "name": "Type: Maintenance", "color": "#fbca04" },
{ "name": "Type: Enhancement", "color": "#84b6eb" },
{ "name": "Type: Question", "color": "#cc317c" }
];
form = document.getElementById("new_label");
for ( i = 0; i < labels.length; i++ ) {
form["label-"].value = labels[i].name;
form["edit-label-color-new"].value = labels[i].color;
form.getElementsByClassName("btn-primary")[0].click()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment