Skip to content

Commit

Permalink
Handle casing correctly with the PR status
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Jan 12, 2021
1 parent f89fef8 commit 6dab34d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 6dab34d

Please sign in to comment.