From 69b3fdcf8e47454339bddea7d7cd5bd08ec06946 Mon Sep 17 00:00:00 2001 From: Benjamin Lannon Date: Wed, 5 Dec 2018 21:03:25 -0500 Subject: [PATCH] More Debugging --- index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.js b/index.js index a2c0464..861b990 100644 --- a/index.js +++ b/index.js @@ -27,6 +27,8 @@ async function run() { idx = labels.indexOf(issue => issue.name === name); } + console.log({ idx }); + if (idx !== -1) { let params = tools.context.repo({ current_name: name, @@ -34,8 +36,10 @@ async function run() { description, headers: { accept: "application/vnd.github.symmetra-preview+json" } }); + console.log("UPDATE"); await octokit.issues.updateLabel(params); labels = labels.splice(idx, 1); + console.log("AFTER SPLICE", labels); } else { let params = tools.context.repo({ name, @@ -43,10 +47,13 @@ async function run() { description, headers: { accept: "application/vnd.github.symmetra-preview+json" } }); + console.log("CREATE"); await octokit.issues.createLabel(params); } }); + console.log(labels); + // Delete labels that exist on GitHub that aren't in labels.json labels.forEach(async label => { let { name } = label;