Browse Source

Stop using label enforcement and clean up shared workflow (#298)

pm/pm-7288/ghas-workflow
Matt Bishop 1 year ago committed by GitHub
parent
commit
2da8ed1d55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 19
      .github/workflows/_enforce-labels.yml
  2. 19
      .github/workflows/enforce-labels.yml

19
.github/workflows/_enforce-labels.yml

@ -1,4 +1,3 @@ @@ -1,4 +1,3 @@
---
name: Enforce PR labels
on:
@ -6,24 +5,12 @@ on: @@ -6,24 +5,12 @@ on:
jobs:
enforce-label:
if: ${{ contains(github.event.*.labels.*.name, 'hold') || contains(github.event.*.labels.*.name, 'needs-qa') }}
if: ${{ contains(github.event.*.labels.*.name, 'hold') }}
name: Enforce label
runs-on: ubuntu-22.04
steps:
- name: Check for label
run: |
echo "PRs with the hold or needs-qa labels cannot be merged"
echo "### :x: PRs with the hold or needs-qa labels cannot be merged" >> $GITHUB_STEP_SUMMARY
echo "PRs with the hold label cannot be merged"
echo "### :x: PRs with the hold label cannot be merged" >> $GITHUB_STEP_SUMMARY
exit 1
# enforce-version-label:
# if: ${{ !contains(github.event.*.labels.*.name, 'version') }}
# name: Enforce version label
# runs-on: ubuntu-22.04
# steps:
# - name: Check for label
# run: |
# echo "PR without the version label cannot be merged."
# echo "### :x: PR without the version label cannot be merged" >> $GITHUB_STEP_SUMMARY
# exit 1

19
.github/workflows/enforce-labels.yml

@ -1,19 +0,0 @@ @@ -1,19 +0,0 @@
---
name: Enforce PR labels
on:
workflow_call:
pull_request:
types: [labeled, unlabeled, opened, reopened, synchronize]
jobs:
enforce-label:
if: ${{ contains(github.event.*.labels.*.name, 'hold') || contains(github.event.*.labels.*.name, 'needs-qa') }}
name: Enforce label
runs-on: ubuntu-22.04
steps:
- name: Check for label
run: |
echo "PRs with the hold or needs-qa labels cannot be merged"
echo "### :x: PRs with the hold or needs-qa labels cannot be merged" >> $GITHUB_STEP_SUMMARY
exit 1
Loading…
Cancel
Save