From 2bf36e10d9e9a7430878927644f0771ff2d3dc5c Mon Sep 17 00:00:00 2001 From: deepthi Date: Wed, 13 Dec 2023 15:46:45 -0800 Subject: [PATCH] only check BackportReason label if Backport to: is set Signed-off-by: deepthi --- .github/workflows/check_label.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_label.yml b/.github/workflows/check_label.yml index 389536cb6fc..7d53d55055b 100644 --- a/.github/workflows/check_label.yml +++ b/.github/workflows/check_label.yml @@ -69,8 +69,10 @@ jobs: exit 1 fi if cat ${LABELS_JSON} | jq -r '.[].name ' | grep -q 'NeedsBackportReason' ; then - echo "Expecting PR to not have the NeedsBackportReason label; please add your justification to the PR description and remove the label." - exit 1 + if cat ${LABELS_JSON} | jq -r '.[].name ' | grep -q 'Backport to:'; then + echo "Expecting PR to not have the NeedsBackportReason label; please add your justification to the PR description and remove the label." + exit 1 + fi fi