When pull_request_review is the event that triggers a workflow run the GitHub context doesn't contain payload.number resulting in the error ##[error]Cannot read property 'replace' of undefined
Example workflow code:
on:
pull_request_review:
types: [submitted]
Possible resolution: pull_request_review contains an event called pull_request.number which contains the PR number.
When
pull_request_review
is the event that triggers a workflow run the GitHub context doesn't containpayload.number
resulting in the error##[error]Cannot read property 'replace' of undefined
Example workflow code:
Possible resolution:
pull_request_review
contains an event calledpull_request.number
which contains the PR number.