Only assign a reviewer when a PR is ready for review (https://github.com/woocommerce/woocommerce-blocks/pull/6461)

* Only assign a reviewer when a PR is ready for review

* Also run reviwer action when opening a normal PR

* Only assign a reviewer when a PR is ready for review
This commit is contained in:
Alex Florisca 2022-05-27 12:05:54 +01:00 committed by GitHub
parent b72b1556d8
commit f85e0c6347
1 changed files with 13 additions and 11 deletions

View File

@ -1,13 +1,15 @@
name: 'Automate assigning team for review.'
on:
pull_request:
types: [ opened ]
on:
pull_request:
types: [opened, ready_for_review]
jobs:
add-reviews:
runs-on: ubuntu-latest
steps:
- name: Check config and assign reviews
uses: acq688/Request-Reviewer-For-Team-Action@v1.1
with:
config: ".github/automate-team-review-assignment-config.yml"
GITHUB_TOKEN: ${{ secrets.PAT_FOR_ACTIONS }}
add-reviews:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Check config and assign reviews
uses: acq688/Request-Reviewer-For-Team-Action@v1.1
with:
config: '.github/automate-team-review-assignment-config.yml'
GITHUB_TOKEN: ${{ secrets.PAT_FOR_ACTIONS }}