From 078628f99fbae1efdc7f6640829009d596e739f7 Mon Sep 17 00:00:00 2001 From: Jakub Majorek Date: Fri, 2 Apr 2021 15:23:43 +0200 Subject: [PATCH] Create GH workflow for UI review assignment (#1046) * test * Simplify workflow * Unassign when checkbox is unchecked --- .github/PULL_REQUEST_TEMPLATE.md | 15 +++++---------- .github/workflows/review-assignment.yml | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/review-assignment.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b8131fd87..b41eef434 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -13,16 +13,11 @@ greatly reduce the amount of work needed to review your work. --> -1. [ ] All visible strings are translated with proper context. -1. [ ] All data-formatting is locale-aware (dates, numbers, and so on). -1. [ ] Translated strings are extracted. -1. [ ] Number of API calls is optimized. -1. [ ] The changes are tested. -1. [ ] Data-test are added for new elements. -1. [ ] Type definitions are up to date. -1. [ ] Changes are mentioned in the changelog. -1. [ ] The changes are tested in different browsers (Chrome, Firefox, Safari). -1. [ ] The changes are tested in light and dark mode. +1. [ ] This code contains UI changes +2. [ ] All visible strings are translated with proper context including data-formatting +3. [ ] Attributes `[data-test-id]` are added for new elements +4. [ ] Changes are mentioned in the changelog +5. [ ] The changes are tested in different browsers and in light/dark mode ### Test environment config diff --git a/.github/workflows/review-assignment.yml b/.github/workflows/review-assignment.yml new file mode 100644 index 000000000..72633427c --- /dev/null +++ b/.github/workflows/review-assignment.yml @@ -0,0 +1,18 @@ +name: Review assignment + +on: + pull_request: + types: [opened, edited] + +jobs: + assign_ui: + runs-on: ubuntu-latest + name: Assign UI Reviewer + if: contains(github.event.pull_request.body , 'This code contains UI changes') + steps: + - name: Add/Remove UI reviewer + uses: jwm0/add-reviewer-gh-action@1.0.4 + with: + reviewers: "pwgryglak" + token: ${{ secrets.GITHUB_TOKEN }} + remove: ${{ !contains(github.event.pull_request.body , '[x] This code contains UI changes') }}