Last active
March 18, 2020 00:47
-
-
Save t18n/79a73cf52bdb23e0436415581d11701d to your computer and use it in GitHub Desktop.
Labelling system attempting to do Scrum on Github
This file contains hidden or 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
[ | |
{ | |
"name": "DEL: dupplicate", | |
"description": "Dupplicated issue", | |
"color": "d9d9d9" | |
}, | |
{ | |
"name": "DEL: invalid", | |
"description": "Invalid issue", | |
"color": "d9d9d9" | |
}, | |
{ | |
"name": "DEL: wontfix", | |
"description": "This issue won't be fixed", | |
"color": "d9d9d9" | |
}, | |
{ | |
"name": "ENV: staging", | |
"description": "Only for staging environment", | |
"color": "9254de" | |
}, | |
{ | |
"name": "ENV: test", | |
"description": "Only for testing purpose", | |
"color": "9254de" | |
}, | |
{ | |
"name": "HL: DO_NOT_MERGE", | |
"description": "Don't merge this issue", | |
"color": "067c5f" | |
}, | |
{ | |
"name": "HL: URGENT", | |
"description": "Very urgent, need to be done quickly", | |
"color": "97fcd9" | |
}, | |
{ | |
"name": "HL: User Story", | |
"description": null, | |
"color": "6ded84" | |
}, | |
{ | |
"name": "PT: 1", | |
"description": "Scrum points is 1", | |
"color": "bae7ff" | |
}, | |
{ | |
"name": "PT: 2", | |
"description": "Story points is 2", | |
"color": "bae7ff" | |
}, | |
{ | |
"name": "PT: 3", | |
"description": "Story points is 3", | |
"color": "bae7ff" | |
}, | |
{ | |
"name": "PT: 5", | |
"description": "Story point is 5", | |
"color": "bae7ff" | |
}, | |
{ | |
"name": "PT: 8", | |
"description": "Story point is 8", | |
"color": "bae7ff" | |
}, | |
{ | |
"name": "PT: 13", | |
"description": "Story point is 13", | |
"color": "bae7ff" | |
}, | |
{ | |
"name": "PT: 21", | |
"description": "Story point is 21", | |
"color": "bae7ff" | |
}, | |
{ | |
"name": "ST: discussion", | |
"description": "Discussion needed", | |
"color": "fff566" | |
}, | |
{ | |
"name": "ST: question", | |
"description": "A question", | |
"color": "fff566" | |
}, | |
{ | |
"name": "ST: unsettled", | |
"description": "Missing information, Dod or need more resource to be acted on", | |
"color": "fff566" | |
}, | |
{ | |
"name": "TYPE: bug", | |
"description": "A bug that makes the software not working properly", | |
"color": "eb2f96" | |
}, | |
{ | |
"name": "TYPE: chore", | |
"description": "Maintenance work", | |
"color": "b7eb8f" | |
}, | |
{ | |
"name": "TYPE: enhancement", | |
"description": "Enhancement for current feature", | |
"color": "b7eb8f" | |
}, | |
{ | |
"name": "TYPE: feature", | |
"description": "A new feature", | |
"color": "b7eb8f" | |
}, | |
{ | |
"name": "TYPE: infrastructure", | |
"description": "Task relate to infrastructure", | |
"color": "b7eb8f" | |
}, | |
{ | |
"name": "TYPE: optimization", | |
"description": "Optimization for current feature", | |
"color": "b7eb8f" | |
}, | |
{ | |
"name": "TYPE: refactor", | |
"description": "Refactor code", | |
"color": "b7eb8f" | |
}, | |
{ | |
"name": "TYPE: test", | |
"description": "Write more test", | |
"color": "b7eb8f" | |
} | |
] |
Label generated by:
var labels = [];
[].slice.call(document.querySelectorAll(".js-label-link"))
.forEach(function(element) {
labels.push({
name: element.textContent.trim(),
description: element.getAttribute("title"),
// using style.backgroundColor might returns "rgb(...)"
color: element.getAttribute("style")
.replace("background-color:", "")
.replace(/color:.*/,"")
.trim()
// github wants hex code only without # or ;
.replace(/^#/, "")
.replace(/;$/, "")
.trim(),
})
})
console.log(JSON.stringify(labels, null, 2))
This is to run on labels
page, where labels has been defined.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Largely inspired by https://github.com/jvandemo/github-scrum-workflow