From 33dc689ca995c9dd44b1dbeefac0b8ba4025e79e Mon Sep 17 00:00:00 2001 From: Darren Ethier Date: Fri, 17 Sep 2021 16:27:09 -0400 Subject: [PATCH] Implement automation to automatically assign the team a PR author belongs to for reviewing the PR. --- .../automate-team-review-assignment-config.yml | 17 +++++++++++++++++ .../automate-team-review-assignment-config.yml | 11 +++++++++++ 2 files changed, 28 insertions(+) create mode 100644 plugins/woocommerce-blocks/.github/automate-team-review-assignment-config.yml create mode 100644 plugins/woocommerce-blocks/.github/workflows/automate-team-review-assignment-config.yml diff --git a/plugins/woocommerce-blocks/.github/automate-team-review-assignment-config.yml b/plugins/woocommerce-blocks/.github/automate-team-review-assignment-config.yml new file mode 100644 index 00000000000..9ecc70888f8 --- /dev/null +++ b/plugins/woocommerce-blocks/.github/automate-team-review-assignment-config.yml @@ -0,0 +1,17 @@ +when: + - author: + teamIs: + - rubik-fp-squad + ignore: + nameIs: + assign: + teams: + - rubik-fp-squad + - author: + teamIs: + -rubik-fse-squad + ignore: + nameIs: + assign: + teams: + -rubik-fse-squad diff --git a/plugins/woocommerce-blocks/.github/workflows/automate-team-review-assignment-config.yml b/plugins/woocommerce-blocks/.github/workflows/automate-team-review-assignment-config.yml new file mode 100644 index 00000000000..814462070b8 --- /dev/null +++ b/plugins/woocommerce-blocks/.github/workflows/automate-team-review-assignment-config.yml @@ -0,0 +1,11 @@ +name: 'Automate assigning team for review.' +on: pull_request +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 }}