From 887e8c1311894143dafd4269e5a88f8ca0da3c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor?= <27339341+priethor@users.noreply.github.com> Date: Wed, 19 Jul 2023 13:56:06 +0200 Subject: [PATCH 1/4] Add GH action to enforce PR labels --- .github/workflows/enforce-pr-labels.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/enforce-pr-labels.yml diff --git a/.github/workflows/enforce-pr-labels.yml b/.github/workflows/enforce-pr-labels.yml new file mode 100644 index 0000000000000..4b573eacb8a62 --- /dev/null +++ b/.github/workflows/enforce-pr-labels.yml @@ -0,0 +1,18 @@ +name: Enforce labels on Pull Request +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: "[Type] Accessibility, [Type] Automated Testing, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] New API, [Type] Other, [Type] Performance, [Type] Project Management, [Type] WP Core Ticket" + add_comment: true + message: "## ⚠️ Type of PR label error\n To merge this PR, it requires {{ errorString }} {{ count }} label indicating the type of PR. Other labels are optional and not being checked here. \n- **Type-related labels to choose from**: {{ provided }}.\n- **Labels found**: {{ applied }}." \ No newline at end of file From c98ae9b07110904cf283f49518bcf7b9561575f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor?= <27339341+priethor@users.noreply.github.com> Date: Wed, 19 Jul 2023 14:44:53 +0200 Subject: [PATCH 2/4] Update enforce-pr-labels.yml --- .github/workflows/enforce-pr-labels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/enforce-pr-labels.yml b/.github/workflows/enforce-pr-labels.yml index 4b573eacb8a62..fcb5cdb87dfca 100644 --- a/.github/workflows/enforce-pr-labels.yml +++ b/.github/workflows/enforce-pr-labels.yml @@ -3,7 +3,7 @@ on: pull_request: types: [opened, labeled, unlabeled, synchronize] jobs: - label: + type-related-labels: runs-on: ubuntu-latest permissions: issues: write @@ -15,4 +15,4 @@ jobs: count: 1 labels: "[Type] Accessibility, [Type] Automated Testing, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] New API, [Type] Other, [Type] Performance, [Type] Project Management, [Type] WP Core Ticket" add_comment: true - message: "## ⚠️ Type of PR label error\n To merge this PR, it requires {{ errorString }} {{ count }} label indicating the type of PR. Other labels are optional and not being checked here. \n- **Type-related labels to choose from**: {{ provided }}.\n- **Labels found**: {{ applied }}." \ No newline at end of file + message: "## ⚠️ Type of PR label error\n To merge this PR, it requires {{ errorString }} {{ count }} label indicating the type of PR. Other labels are optional and not being checked here. \n- **Type-related labels to choose from**: {{ provided }}.\n- **Labels found**: {{ applied }}." From 364cc27cfda09215d685665e15144745c5f15bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor?= <27339341+priethor@users.noreply.github.com> Date: Tue, 25 Jul 2023 13:25:24 +0200 Subject: [PATCH 3/4] Update enforce-pr-labels.yml --- .github/workflows/enforce-pr-labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/enforce-pr-labels.yml b/.github/workflows/enforce-pr-labels.yml index fcb5cdb87dfca..504c84af6f55b 100644 --- a/.github/workflows/enforce-pr-labels.yml +++ b/.github/workflows/enforce-pr-labels.yml @@ -13,6 +13,6 @@ jobs: with: mode: exactly count: 1 - labels: "[Type] Accessibility, [Type] Automated Testing, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] New API, [Type] Other, [Type] Performance, [Type] Project Management, [Type] WP Core Ticket" + labels: "[Type] Accessibility (a11y), [Type] Automated Testing, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] New API, [Type] Other, [Type] Performance, [Type] Project Management, [Type] WP Core Ticket" add_comment: true message: "## ⚠️ Type of PR label error\n To merge this PR, it requires {{ errorString }} {{ count }} label indicating the type of PR. Other labels are optional and not being checked here. \n- **Type-related labels to choose from**: {{ provided }}.\n- **Labels found**: {{ applied }}." From 18936a6d192f17345e2351ee57da19a935444770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor?= <27339341+priethor@users.noreply.github.com> Date: Wed, 26 Jul 2023 13:20:44 +0200 Subject: [PATCH 4/4] Update enforce-pr-labels.yml --- .github/workflows/enforce-pr-labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/enforce-pr-labels.yml b/.github/workflows/enforce-pr-labels.yml index 504c84af6f55b..0ea94ba5f2292 100644 --- a/.github/workflows/enforce-pr-labels.yml +++ b/.github/workflows/enforce-pr-labels.yml @@ -13,6 +13,6 @@ jobs: with: mode: exactly count: 1 - labels: "[Type] Accessibility (a11y), [Type] Automated Testing, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] New API, [Type] Other, [Type] Performance, [Type] Project Management, [Type] WP Core Ticket" + labels: "[Type] Accessibility (a11y), [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Performance, [Type] Project Management, [Type] Security, [Type] WP Core Ticket" add_comment: true message: "## ⚠️ Type of PR label error\n To merge this PR, it requires {{ errorString }} {{ count }} label indicating the type of PR. Other labels are optional and not being checked here. \n- **Type-related labels to choose from**: {{ provided }}.\n- **Labels found**: {{ applied }}."