Skip to content

Commit

Permalink
exit 0 on no URL found
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Sep 10, 2024
1 parent a742945 commit 4ab2941
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion script/ci/version_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit 4ab2941

Please sign in to comment.