From af11c8f5e507d53339f4344a2b8d0f4cc09223cb Mon Sep 17 00:00:00 2001 From: "Lumberbot (aka Jack)" <39504233+meeseeksmachine@users.noreply.github.com> Date: Thu, 22 Jun 2023 03:11:41 -0700 Subject: [PATCH] Backport PR #2518 on branch 1.9.x (Check PRs for milestones) (#2523) Co-authored-by: Philipp A --- .github/workflows/check-pr.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/check-pr.yml diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml new file mode 100644 index 0000000000..eef72e36c9 --- /dev/null +++ b/.github/workflows/check-pr.yml @@ -0,0 +1,31 @@ +name: Pull Request Validation + +on: + pull_request: + branches: + - main + - master + types: + # milestone changes + - milestoned + - demilestoned + # label changes for “no milestone” + - labeled + - unlabeled + # initial check + - opened + - edited + - reopened + # code change (e.g. this workflow) + - synchronize + +env: + LABELS: ${{ join( github.event.pull_request.labels.*.name, '|' ) }} + +jobs: + check-milestone: + name: Check Milestone + runs-on: ubuntu-latest + steps: + - if: github.event.pull_request.milestone == null && contains( env.LABELS, 'no milestone' ) == false + run: exit 1