percy / storybook-action

[Deprecated] A GitHub action to run Percy with Storybook
https://docs.percy.io/docs/github-actions#section-storybook-action
MIT License
11 stars 5 forks source link

fix: Handle PR number when pull_request_review is the trigger #12

Closed covertbert closed 4 years ago

covertbert commented 4 years ago

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.

Robdel12 commented 4 years ago

Thanks for the PR!

covertbert commented 4 years ago

No worries, thanks for getting it merged so quickly!