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
This commit is contained in:
Marcus Efraimsson 2021-12-14 11:33:13 +01:00 committed by GitHub
parent 155487bfb0
commit 8e0da70026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 0 deletions

9
.github/pr-checks.json vendored Normal file
View File

@ -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"
}
]

28
.github/workflows/pr-checks.yml vendored Normal file
View File

@ -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