diff --git a/src/files.ts b/src/files.ts index 7ad3b37b..0008e744 100644 --- a/src/files.ts +++ b/src/files.ts @@ -39,9 +39,7 @@ export async function getPullRequestFiles(): Promise { 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"); }