Support `pull_request_target` and `pull_request_review`
See original GitHub issueBy @NicholasBoll in https://github.com/chromaui/action/issues/56:
Github Actions now support pull requests from forks: https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/
More info about the pull_request_target
event type: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target
However, the code explicitly prevents that type: https://github.com/chromaui/action/blob/c427f36903fb8c899e440bc90cb51822ef2959ed/src/main.ts#L25-L55
Here’s an example run failure: https://github.com/Workday/canvas-kit/pull/788/checks?check_run_id=1114827451
pull_request_target
should be a valid event.
Note: from our testing, adding pull_request_target
or changing pull_request
to pull_request_target
in a Pull Request will result in Github Actions not running for that pull request. The event type is supposed to run code from the base branch (the branch the PR is being merged into) which gets Actions into a state where nothing triggers.
By @marboro92 in https://github.com/chromaui/action/issues/59:
My team would like to run chromatic checks only after a review is submitted, but currently the pull_request_review event (info on this event: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_review) is not supported by chromaui.
Would it be possible to add support for pull_request_review?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
@tmeasday not yet, but I’ll put this on my todo list to find out and assess if it’s ok to just add these events 👍
I think the basic setup would look something like this
also, you’d need to run chromatic as normal on main, perhaps in a separate workflow