Skip to content

Commit a7b4c08

Browse files
committed
Enhance URL validation in issue-to-PR workflow to check for empty properties URL before validation
1 parent 241a322 commit a7b4c08

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/issue_to_pr.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,13 @@ jobs:
5454
- name: Validate properties URL
5555
id: validateUrl
5656
run: |
57-
if ! curl --output /dev/null --silent --head --fail "${{ fromJson(steps.parseIssue.outputs.payload).properties_url }}"; then
58-
echo "Url not valid: ${{ fromJson(steps.parseIssue.outputs.payload).properties_url }}"
57+
properties_url="${{ fromJson(steps.parseIssue.outputs.payload).properties_url }}"
58+
if [ -z "$properties_url" ]; then
59+
echo "Properties URL is empty. Please provide a valid URL."
60+
exit 1
61+
fi
62+
if ! curl --output /dev/null --silent --head --fail "$properties_url"; then
63+
echo "Url not valid: $properties_url"
5964
exit 1
6065
fi
6166

0 commit comments

Comments
 (0)