From 4c308b124d122b7c9811cc89da9049f3ad32a2d4 Mon Sep 17 00:00:00 2001 From: Vicente Zepeda Mas Date: Tue, 3 Mar 2026 09:49:31 +0100 Subject: [PATCH] Adds check for variable PULL_NUMBER Signed-off-by: Vicente Zepeda Mas --- .../openshift-qe/orion/openshift-qe-orion-commands.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci-operator/step-registry/openshift-qe/orion/openshift-qe-orion-commands.sh b/ci-operator/step-registry/openshift-qe/orion/openshift-qe-orion-commands.sh index 5fb8a93d8f062..6f5289f106282 100755 --- a/ci-operator/step-registry/openshift-qe/orion/openshift-qe-orion-commands.sh +++ b/ci-operator/step-registry/openshift-qe/orion/openshift-qe-orion-commands.sh @@ -162,15 +162,15 @@ fi # it must be set as $PULL_NUMBER OR 0 to get compared against periodic runs. pull_number='' if [[ "${JOB_TYPE}" == "periodic" ]]; then - if [[ "${PULL_NUMBER}" -ne 0 ]]; then - pull_number="$PULL_NUMBER OR 0" + if [[ -n "${PULL_NUMBER:-}" ]] && [[ "${PULL_NUMBER}" -ne 0 ]]; then + pull_number="${PULL_NUMBER} OR 0" job_type="periodic OR pull" else job_type="periodic" fi -elif [[ "${JOB_TYPE}" == "presubmit" && "${JOB_NAME}" =~ ^pull* ]]; then +elif [[ "${JOB_TYPE}" == "presubmit" && "${JOB_NAME}" =~ ^pull* ]] && [[ -n "${PULL_NUMBER:-}" ]]; then # Indicates a ci test triggered in PR against a pull request - pull_number="$PULL_NUMBER OR 0" + pull_number="${PULL_NUMBER} OR 0" job_type="periodic OR pull" elif [[ "${JOB_TYPE}" == "presubmit" && "${JOB_NAME}" == *rehearse* ]]; then # Indicates a rehearsel in PR against openshift/release repo