From 31eb8e0ea0650e7e679ff3feee42b5bdfc762cda Mon Sep 17 00:00:00 2001 From: Brian Henry Date: Sat, 8 Feb 2020 11:13:54 -0600 Subject: [PATCH] tidy up comments & whitespace --- index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index a1e4bc6..d5d26f1 100644 --- a/index.js +++ b/index.js @@ -15,11 +15,11 @@ async function run() { const octokit = new github.GitHub(token); const payload = github.context.payload; - // personal repos have no org + // personal repos have no org - allow for those as well as team ones const owner = (payload.organization || payload.repository.owner).login; const repo = payload.repository.name; - // issue events (like create comment) supply #issue instead od #pull_request + // issue events (like create comment) supply #issue instead of #pull_request - handle both const issue_number = (payload.pull_request || payload.issue).number; const issuesArgs = { owner, repo, issue_number }; @@ -45,14 +45,12 @@ async function run() { console.log(prComments.data.map(i => i.body)); } - console.log('matches:') console.log(matchedStrings); core.setOutput('msg', `Found ${matchedStrings.length} with matching links`) if(matchedStrings.length === 0) core.setFailed(`unable to find any comments matching link ${linkRegExInput}`) - } catch (error) { console.log(error); core.setFailed(error.message);