Merge pull request #5 from lannonbr/fix-color-hash-bug

Removing # when running app
This commit is contained in:
Benjamin Lannon 2019-02-19 19:17:29 -05:00 committed by GitHub
commit ec1266042a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 4 deletions

View file

@ -1,6 +1,6 @@
from node:10.14.2-slim 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 repository="https://github/lannonbr/issue-label-manager-action"
LABEL maintainer="Benjamin Lannon <benjamin@lannonbr.com>" LABEL maintainer="Benjamin Lannon <benjamin@lannonbr.com>"

View file

@ -14,6 +14,13 @@ async function run() {
let liveLabels = await getCurrentLabels(); let liveLabels = await getCurrentLabels();
let newLabels = JSON.parse(fs.readFileSync(newLabelsUrl).toString()); 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); let labelModList = diffLabels(liveLabels, newLabels);
labelModList.forEach(async mod => { labelModList.forEach(async mod => {

4
package-lock.json generated
View file

@ -1,6 +1,6 @@
{ {
"name": "issue-label-action", "name": "issue-label-manager-action",
"version": "1.0.0", "version": "1.1.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View file

@ -1,6 +1,6 @@
{ {
"name": "issue-label-manager-action", "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", "description": "Will update repo's labels based on data in JSON file located at $REPO/.github/labels.json",
"main": "index.js", "main": "index.js",
"scripts": {}, "scripts": {},