Removing # when running function
This commit is contained in:
parent
3984e22b68
commit
8e524e03ad
1 changed files with 7 additions and 0 deletions
7
index.js
7
index.js
|
@ -14,6 +14,13 @@ async function run() {
|
|||
let liveLabels = await getCurrentLabels();
|
||||
let newLabels = JSON.parse(fs.readFileSync(newLabelsUrl).toString());
|
||||
|
||||
// If the color of a label has a # sign, remove it
|
||||
newLabels.forEach(newLabel => {
|
||||
if (newLabel.color[0] === "#") {
|
||||
newLabel.color = newLabel.color.slice(1);
|
||||
}
|
||||
});
|
||||
|
||||
let labelModList = diffLabels(liveLabels, newLabels);
|
||||
|
||||
labelModList.forEach(async mod => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue