From 4ab29414e277e3446825ceba673a3fa5045a22ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Tue, 10 Sep 2024 10:00:29 +0200 Subject: [PATCH] exit 0 on no URL found --- script/ci/version_check.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/ci/version_check.sh b/script/ci/version_check.sh index 7f35fcb2b44d..93918933fe15 100755 --- a/script/ci/version_check.sh +++ b/script/ci/version_check.sh @@ -34,7 +34,12 @@ set -e PR_BODY="$1" # Extract URL from PR description -WP_URL=$(echo "${PR_BODY}" | grep -oE 'https://community.openproject.org/(wp|work_packages|projects/[^/]+/work_packages)/[0-9]+') +WP_URL=$(echo "$PR_BODY" | grep -oE 'https://community.openproject.org/(wp|work_packages|projects/[^/]+/work_packages)/[0-9]+' || true) + +if [ -z "$WP_URL" ]; then + echo "No valid work package URL found." + exit 0 +fi if [ -z "$WP_URL" ]; then echo "::warning::PR description does not contain a valid URL to an OpenProject ticket."