From bec7de8d08f46eb063b15018502cd493a0d236d7 Mon Sep 17 00:00:00 2001 From: Opeyemi Date: Fri, 22 Mar 2024 18:34:11 +0000 Subject: [PATCH] revert the enforce label logic (#269) --- .github/workflows/enforce-labels.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/enforce-labels.yml b/.github/workflows/enforce-labels.yml index 86b5f910..bda92d66 100644 --- a/.github/workflows/enforce-labels.yml +++ b/.github/workflows/enforce-labels.yml @@ -8,17 +8,12 @@ on: 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 - env: - LABEL_HOLD: ${{ contains(github.event.*.labels.*.name, 'hold') }} - LABEL_NEEDS_QA: ${{ contains(github.event.*.labels.*.name, 'needs-qa') }} run: | - if [[ "$LABEL_HOLD" = "true" ]] || [[ "$LABEL_NEEDS_QA" = "true" ]]; then - 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 - fi + 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