diff --git a/Dockerfile b/Dockerfile index 09e4211..5063902 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ from node:10.14.2-slim -LABEL version="1.0.0" +LABEL version="1.1.0" LABEL repository="https://github/lannonbr/issue-label-manager-action" LABEL maintainer="Benjamin Lannon " diff --git a/index.js b/index.js index 4bfcf3d..4d029c7 100644 --- a/index.js +++ b/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 => { diff --git a/package-lock.json b/package-lock.json index 811b686..060dbc2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { - "name": "issue-label-action", - "version": "1.0.0", + "name": "issue-label-manager-action", + "version": "1.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f2b7610..fbf81fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "issue-label-manager-action", - "version": "1.0.0", + "version": "1.1.0", "description": "Will update repo's labels based on data in JSON file located at $REPO/.github/labels.json", "main": "index.js", "scripts": {},