From 2da8ed1d556f7a5309cefef07d0ed6f19fc751c1 Mon Sep 17 00:00:00 2001 From: Matt Bishop Date: Thu, 18 Jul 2024 10:21:12 -0400 Subject: [PATCH] Stop using label enforcement and clean up shared workflow (#298) --- .github/workflows/_enforce-labels.yml | 19 +++---------------- .github/workflows/enforce-labels.yml | 19 ------------------- 2 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/enforce-labels.yml diff --git a/.github/workflows/_enforce-labels.yml b/.github/workflows/_enforce-labels.yml index 4539ac79..426ca99d 100644 --- a/.github/workflows/_enforce-labels.yml +++ b/.github/workflows/_enforce-labels.yml @@ -1,4 +1,3 @@ ---- name: Enforce PR labels 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 diff --git a/.github/workflows/enforce-labels.yml b/.github/workflows/enforce-labels.yml deleted file mode 100644 index bda92d66..00000000 --- a/.github/workflows/enforce-labels.yml +++ /dev/null @@ -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