diff --git a/src/github.ts b/src/github.ts index c9c825208..2ff9128cd 100644 --- a/src/github.ts +++ b/src/github.ts @@ -6,7 +6,11 @@ type GitHub = ReturnType export function getPrNumber(): number | undefined { const pullRequest = github.context.payload.pull_request if (!pullRequest) { - return undefined + const issue = github.context.payload.issue + if (!issue) { + return undefined + } + return issue.number } return pullRequest.number