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.