Skip to content

Commit 2340122

Browse files
authored
Fix non-numeric pull request error (#369)
1 parent bae377c commit 2340122

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/merge.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,9 @@ export async function performMergeAction(
422422
typeof response.repository.pullRequest === "object" &&
423423
"id" in response.repository.pullRequest &&
424424
response.repository.pullRequest.id;
425-
if (typeof pullRequestId !== "number") {
426-
console.error("non-numeric pull request id", JSON.stringify(response));
427-
throw new Error("non-numeric pull request id");
425+
if (!pullRequestId) {
426+
console.error("missing pull request id", JSON.stringify(response));
427+
throw new Error("missing pull request id");
428428
}
429429

430430
await octokit.graphql(

0 commit comments

Comments
 (0)