ethereum / EIP-Bot

A collection of bots that make life easier on editors
Creative Commons Zero v1.0 Universal
41 stars 37 forks source link

Update PR number logic #103

Closed Pandapip1 closed 2 years ago

Pandapip1 commented 2 years ago

Blocking https://github.com/ethereum/EIPs/pull/5328

Pandapip1 commented 2 years ago

@MicahZoltu I require your approval. Please merge this.

MicahZoltu commented 2 years ago

Can you help me understand why this is necessary? How do we end up in a situation where context.payload?.pull_request?.number doesn't exist but PR_NUMBER environment variable does?

Pandapip1 commented 2 years ago

How do we end up in a situation where context.payload?.pull_request?.number doesn't exist but PR_NUMBER environment variable does?

When the workflow is run manually.

MicahZoltu commented 2 years ago

Hmm, do we have an example of this failing? Even for manual re-runs, I would expect the PR number to be available for any pull_request targeted workflow.

Pandapip1 commented 2 years ago

Hmm, do we have an example of this failing? Even for manual re-runs, I would expect the PR number to be available for any pull_request targeted workflow.

Let me be a bit more specific: this is for when we aren't targeting this with pull_request. Currently, this is unnecessary. It is preventing me from making some changes, however.

MicahZoltu commented 2 years ago

Ah, I see. The idea is to trigger a workflow run, but in order to do that we need to parameterize the inputs since that workflow won't be run in the context of a PR?