From 6dab34d48c14e2f29ec4b3b4ef56660f4528522f Mon Sep 17 00:00:00 2001 From: Orta Date: Tue, 12 Jan 2021 16:29:34 +0000 Subject: [PATCH] Handle casing correctly with the PR status --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index c954a520..31fee59d 100644 --- a/index.js +++ b/index.js @@ -7,7 +7,7 @@ const {readFileSync} = require("fs"); // Effectively the main function async function run() { - core.info("Running version 1.5.0") + core.info("Running version 1.5.1") // Tell folks they can merge if (context.eventName === "pull_request_target") { @@ -123,7 +123,7 @@ async function mergeIfLGTMAndHasAccess() { return } - if (prInfo.data.state !== "OPEN") { + if (prInfo.data.state.toLowerCase() !== "open") { await octokit.issues.createComment({ ...thisRepo, issue_number: issue.number, body: `Sorry @${sender}, this PR isn't open.` }); return }