Skip to content

Commit

Permalink
chore: manage issues (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienKode authored Feb 13, 2023
1 parent 443260f commit e214d41
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ type GitHub = ReturnType<typeof github.getOctokit>
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
Expand Down

0 comments on commit e214d41

Please sign in to comment.