2022-12-19 18:38:41 +00:00
|
|
|
# This workflow checks that there is either a 'pr/no-milestone' label applied to a PR
|
|
|
|
# or there is a milestone associated with a PR
|
|
|
|
|
|
|
|
name: Check Milestone
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2023-07-11 15:25:44 +00:00
|
|
|
# milestoned and demilestoned work (https://github.com/github/docs/issues/23909) but they aren't listed in the github documentation
|
|
|
|
types: [opened, synchronize, labeled, unlabeled, milestoned, demilestoned]
|
2022-12-19 18:38:41 +00:00
|
|
|
# Runs on PRs to main and release branches
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- release/**
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
# checks that a milestone entry is present for a PR
|
|
|
|
milestone-check:
|
2023-04-18 19:03:35 +00:00
|
|
|
# If there is a `pr/no-milestone` label we ignore this check
|
2023-07-11 15:25:44 +00:00
|
|
|
if: "!contains(github.event.pull_request.labels.*.name, 'pr/no-milestone')"
|
2022-12-19 18:38:41 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-07-13 13:19:21 +00:00
|
|
|
- name: Check milestone
|
|
|
|
run: ${{ github.event.pull_request.milestone != null }}
|