EIPs/.github/workflows/rerun-bot-pull-request-review.yml
Alita Moore 069dad3b2e
Workaround for pull_request_review not being in-scope for repostiory secrets (#3530)
* Update auto-merge-bot.yml

* Update auto-merge-bot.yml

* Update auto-merge-bot.yml

* Update auto-merge-bot.yml

* Update auto-merge-bot.yml

* Update auto-merge-bot.yml

* Update auto-merge-bot.yml

* Update auto-merge-bot.yml

* address comments and rerun instead of delete

* update bot to also show reasons in exception message

* throws error if no workflow runs were found to re-run

* use bot id rather than file name to improve reliability

* try to split up the jobs

* don't filter by review type for testing

* fix yml errors

* fix yml again 😬

* only run on approved review

* revert

* Update auto-merge-bot.yml

* Update auto-merge-bot.yml

* Create test.yml

* standard initial bot run, if review run dummy action, workflow_run trigger bot from root repo scope

* rename job

* fix CI

* update re-run action
2021-04-25 02:11:52 -05:00

11 lines
671 B
YAML

on:
pull_request_review:
types: [submitted]
name: Rerun Bot
jobs:
rerun_bot_on_review:
runs-on: ubuntu-latest
name: Trigger Bot Rerun workflow_run
steps:
- name: Explanation
run: echo "this bot is used to trigger another workflow using the workflow_run github event; this is necessary because without it forked PRs do not have access to repo secret; normally this is circumvented using the pull_request_target event but because github actions.. a hack is required to allow the same behavior on pull_request_review; this work-around will no longer be necessary if github ever implements a pull_request_review_target or something similar"