diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml index 5a233a7005..8909a6ad6a 100644 --- a/.github/workflows/pr-lint.yml +++ b/.github/workflows/pr-lint.yml @@ -48,7 +48,13 @@ jobs: - name: Check PR labels env: LABEL_NAMES: ${{ toJson(github.event.pull_request.labels.*.name) }} - if: "((contains(env.LABEL_NAMES, 'status: pending review') == contains(env.LABEL_NAMES, 'status: in progress') == contains(env.LABEL_NAMES, 'status: blocked')))" + if: "( + (contains(env.LABEL_NAMES, 'status: pending review') && !contains(env.LABEL_NAMES, 'status: in progress') && !contains(env.LABEL_NAMES, 'status: blocked')) + || + (!contains(env.LABEL_NAMES, 'status: pending review') && contains(env.LABEL_NAMES, 'status: in progress') && !contains(env.LABEL_NAMES, 'status: blocked')) + || + (!contains(env.LABEL_NAMES, 'status: pending review') && !contains(env.LABEL_NAMES, 'status: in progress') && contains(env.LABEL_NAMES, 'status: blocked')) + )" run: | echo "PR must have exactly one of these labels: ['status: pending review', 'status: in progress', 'status: blocked']." exit 1