Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #103 from Pandapip1/patch-4
Browse files Browse the repository at this point in the history
Update PR number logic
  • Loading branch information
MicahZoltu authored Jul 30, 2022
2 parents 16ab13b + 0c73dd6 commit 546ada0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/infra/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

2 comments on commit 546ada0

@JEAlfonsoP
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will allow to assign a manually PR number (eventually an EIP number) defined in the environment. If this is what you want I can try to test it.

@Pandapip1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has already been tested and it doesn't fully work. #109 fixes this.

Please sign in to comment.