diff --git a/action.yml b/action.yml index d9c39279..948b1f69 100755 --- a/action.yml +++ b/action.yml @@ -5,6 +5,9 @@ inputs: description: |- The Github token to be used. This is optional because if it's not provided the bot will use a token from a brand new account not associated with any repositories and the key is gone required: false + PR_NUMBER: + description: The Pull Request number + required: false CORE_EDITORS: description: a list of editors in the following format "@github_username,@..." to be mentioned for core eip changes required: true diff --git a/src/infra/github.ts b/src/infra/github.ts index c4a3ff42..348cb9f8 100755 --- a/src/infra/github.ts +++ b/src/infra/github.ts @@ -19,7 +19,7 @@ const getEventName = () => { }; const getPullNumber = () => { - return context.payload?.pull_request?.number; + return context.payload?.pull_request?.number || Number(process.env.PR_NUMBER); }; const getPullRequestFromNumber = (pullNumber: number) => {