From e97b4776587de1e20ab18fb9c9e675d6533c9de1 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 3 Jun 2024 20:11:26 -0400 Subject: [PATCH 1/2] ci: ensure 'breaking change' label for PRs that touch stable configs --- .github/workflows/pr-labels.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/pr-labels.yml diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml new file mode 100644 index 000000000000..d5eb3d028939 --- /dev/null +++ b/.github/workflows/pr-labels.yml @@ -0,0 +1,25 @@ +name: Pull Request Labels + +on: + pull_request: + types: [labeled, opened, synchronize, unlabeled] + +jobs: + label: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - id: changed-stable-configs + uses: tj-actions/changed-files@v44.5.2 + with: + files: packages/{eslint-plugin,typescript-eslint}/src/configs/{recommended,stylistic}* + - if: steps.changed-stable-configs.outputs.any_changed == 'true' + uses: mheap/github-action-required-labels@v5.4.1 + with: + add_comment: true + count: 1 + labels: breaking change + message: "🤖 Beep boop! PRs that change our stable preset configs must be labeled with `breaking change`." + mode: minimum From 45d051cea86f2026027ec099399f83534a6d8d26 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Mon, 3 Jun 2024 23:17:42 -0400 Subject: [PATCH 2/2] chore: format --- .github/workflows/pr-labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml index d5eb3d028939..3ede15e78943 100644 --- a/.github/workflows/pr-labels.yml +++ b/.github/workflows/pr-labels.yml @@ -21,5 +21,5 @@ jobs: add_comment: true count: 1 labels: breaking change - message: "🤖 Beep boop! PRs that change our stable preset configs must be labeled with `breaking change`." + message: '🤖 Beep boop! PRs that change our stable preset configs must be labeled with `breaking change`.' mode: minimum