Skip to content
This repository was archived by the owner on May 4, 2025. It is now read-only.

Commit 003d65f

Browse files
committed
Changed workflow
1 parent cf0ba47 commit 003d65f

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/issue-submission.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@ jobs:
2525
TAGS=$(grep -oP 'Tags: \K.*' issue_body.txt || echo "")
2626
GITHUB_LINK=$(grep -oP 'GitHub Link: \K.*' issue_body.txt || echo "")
2727
PROJECT_LINK=$(grep -oP 'Project Link: \K.*' issue_body.txt || echo "")
28-
29-
# Extract PostImage URL from the issue body
30-
# First try to find a specific PostImage URL
31-
IMAGE_URL=$(grep -oP 'Image URL: \K(https?://(?:i\.)?postimg\.cc/\S+)' issue_body.txt || echo "")
32-
33-
# If not found, look for any postimg.cc URL in the body
34-
if [ -z "$IMAGE_URL" ]; then
35-
IMAGE_URL=$(grep -oP 'https?://(?:i\.)?postimg\.cc/\S+' issue_body.txt | head -1 || echo "")
28+
29+
# Extract PostImage URL from the issue body more robustly
30+
IMAGE_URL=$(grep -oP 'Image URL: *\K(https?://(?:i\.)?postimg\.cc/\S+)' issue_body.txt || echo "")
31+
32+
# Validate image URL before proceeding
33+
if [[ "$IMAGE_URL" == *"paste the image"* ]] || [[ "$IMAGE_URL" != http* ]]; then
34+
IMAGE_URL="https://via.placeholder.com/300x200?text=No+Image"
3635
fi
3736
3837
# If still not found, check for markdown image syntax with postimg.cc links

0 commit comments

Comments
 (0)