Skip to content

Commit

Permalink
Merge pull request #150 from xt0rted/issue-number
Browse files Browse the repository at this point in the history
Simplify pr number check
  • Loading branch information
xt0rted authored Feb 24, 2021
2 parents 22945f7 + 679dbdc commit 6ffd6c0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ export async function getPullRequestFiles(): Promise<string[]> {
const token = getInput("repo-token", { required: true });
const githubClient = getOctokit(token);

const pullNumber = (context.payload.issue || context.payload.pull_request || context.payload).number;

if (!pullNumber) {
if (!context.issue.number) {
throw Error("Unable to get pull request number from action event");
}

Expand Down

0 comments on commit 6ffd6c0

Please sign in to comment.