From 37dc621d8b0f2f261cf5d8d0cde95fbfa7927188 Mon Sep 17 00:00:00 2001 From: Bartek Szopka Date: Thu, 21 Mar 2024 09:26:44 +0100 Subject: [PATCH] Require the review of Percy visual tests --- .github/labeler.yml | 3 +++ .github/workflows/pr-labels.yml | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .github/workflows/pr-labels.yml diff --git a/.github/labeler.yml b/.github/labeler.yml index 8518bf75f..51c1dbefc 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -3,3 +3,6 @@ Maintenance 🔨: - any-glob-to-any-file: - package.json - .gitignore +"Review: Percy needed": +- changed-files: + - any-glob-to-any-file: src/** diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml new file mode 100644 index 000000000..4baa2acc4 --- /dev/null +++ b/.github/workflows/pr-labels.yml @@ -0,0 +1,23 @@ +name: PR Percy Review Label Required +on: + pull_request: + types: [opened, labeled, unlabeled, synchronize] +jobs: + label: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: mheap/github-action-required-labels@v5 + with: + mode: exactly + count: 1 + labels: "Review: Percy +1" + add_comment: true + message: | + This PR is being prevented from merging because it needs to be reviewed on Percy. + + Go to [Percy](https://percy.io/bb49709b/react-components), find the build relevant to this PR and check if it looks as expected. + + Once it's approved, add the label `Review: Percy +1` to this PR.