Skip to content

Commit

Permalink
Add user-agent.
Browse files Browse the repository at this point in the history
Signed-off-by: ZePan110 <[email protected]>
  • Loading branch information
ZePan110 committed Sep 24, 2024
1 parent 7e2f164 commit 8b6833f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr-path-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
cd ${{github.workspace}}
fail="FALSE"
url_lines=$(grep -Eo '\]\(http[s]?://[^)]+\)' --include='*.md' -r .|grep -Ev 'linkedin')
url_lines=$(grep -Eo '\]\(http[s]?://[^)]+\)' --include='*.md' -r .)
if [ -n "$url_lines" ]; then
for url_line in $url_lines; do
url=$(echo "$url_line"|cut -d '(' -f2 | cut -d ')' -f1|sed 's/\.git$//')
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
path=$(echo "$link"|cut -d':' -f1 | cut -d'/' -f2-)
attempt_num=1
while [ $attempt_num -le 5 ]; do
do_retry=$(curl -s -o /dev/null -w "%{http_code}" "$url")
do_retry=$(curl -s -o /dev/null -w "%{http_code}" -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36" "$url")
if [ "$do_retry" -eq 200 ]; then
echo "$url Retry successful"
break
Expand Down

0 comments on commit 8b6833f

Please sign in to comment.