From 8e0da7002612055c53fedf77254de9421b81e2c8 Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Tue, 14 Dec 2021 11:33:13 +0100 Subject: [PATCH] Chore: Add PR Check action enforcing a milestone is set (#43025) Adds a PR Check action with a rule that enforces a milestone is set on the PR. Ref grafana/grafana-github-actions#34 Ref grafana/grafana-github-actions#42 --- .github/pr-checks.json | 9 +++++++++ .github/workflows/pr-checks.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .github/pr-checks.json create mode 100644 .github/workflows/pr-checks.yml diff --git a/.github/pr-checks.json b/.github/pr-checks.json new file mode 100644 index 00000000000..15cc829c0e1 --- /dev/null +++ b/.github/pr-checks.json @@ -0,0 +1,9 @@ +[ + { + "type": "check-milestone", + "title": "Milestone Check", + "targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#assign-a-milestone", + "success": "Milestone set", + "failure": "Milestone not set" + } +] \ No newline at end of file diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml new file mode 100644 index 00000000000..7ff67a1e1b1 --- /dev/null +++ b/.github/workflows/pr-checks.yml @@ -0,0 +1,28 @@ +name: PR Checks +on: + pull_request: + types: + - opened + - synchronize + issues: + types: + - milestoned + - demilestoned + +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: Checkout Actions + uses: actions/checkout@v2 + with: + repository: "grafana/grafana-github-actions" + path: ./actions + ref: main + - name: Install Actions + run: npm install --production --prefix ./actions + - name: Run PR Checks + uses: ./actions/pr-checks + with: + token: ${{secrets.GITHUB_TOKEN}} + configPath: pr-checks