open-vault/.github/workflows/milestone-checker.yml
hc-github-team-secure-vault-core d2bbc42fcb
backport of commit bfa93fdeda1a998dc9c2a91c5c14424456b6d1d7 (#21782) (#21786)
* use shas instead of versions and fix milestones

* remove trailing space

Co-authored-by: miagilepner <mia.epner@hashicorp.com>
2023-07-13 15:19:21 +02:00

24 lines
843 B
YAML

# 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:
# 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]
# Runs on PRs to main and release branches
branches:
- main
- release/**
jobs:
# checks that a milestone entry is present for a PR
milestone-check:
# If there is a `pr/no-milestone` label we ignore this check
if: "!contains(github.event.pull_request.labels.*.name, 'pr/no-milestone')"
runs-on: ubuntu-latest
steps:
- name: Check milestone
run: ${{ github.event.pull_request.milestone != null }}