Skip to content

Commit 5ad324c

Browse files
author
Jeremy Dai
authored
Update auto-update.yml
1 parent c17ccf8 commit 5ad324c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/auto-update.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,15 @@ jobs:
5050
run: |
5151
# Extract the repository URL from the issue body
5252
# The format will match our template structure
53-
REPO_URL=$(echo "$ISSUE_BODY" | grep -o "### GitHub Repository URL.*" | sed -E 's/### GitHub Repository URL\s*//g' | tr -d '\r' | xargs)
53+
REPO_URL=$(echo "$ISSUE_BODY" | grep -A 1 "GitHub Repository URL" | tail -n 1 | xargs)
54+
55+
# If that fails, try alternative format
56+
if [ -z "$REPO_URL" ]; then
57+
REPO_URL=$(echo "$ISSUE_BODY" | grep -o "https://github.com[^ ]*" | head -n 1)
58+
fi
59+
60+
# Clean up the URL (remove any trailing characters)
61+
REPO_URL=$(echo "$REPO_URL" | sed -E 's/[^[:alnum:]\/\.\:\-\_].*//g')
5462
5563
# Output the extracted values for debugging
5664
echo "Repository URL: $REPO_URL"
@@ -144,4 +152,4 @@ jobs:
144152
repo: repo.repo,
145153
issue_number: issue_number,
146154
body: `❌ Failed to process the server manifest. Please check the [action logs](${run_url}) for details.`
147-
});
155+
});

0 commit comments

Comments
 (0)