Skip to content

Commit

Permalink
Simplify pr number check
Browse files Browse the repository at this point in the history
  • Loading branch information
xt0rted committed Feb 24, 2021
1 parent 22945f7 commit 679dbdc
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 679dbdc

Please sign in to comment.