Blocking link checks that require a login (#1946)
Signed-off-by: ZePan110 <ze.pan@intel.com> Co-authored-by: chen, suyue <suyue.chen@intel.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
4
.github/workflows/pr-link-path-scan.yml
vendored
4
.github/workflows/pr-link-path-scan.yml
vendored
@@ -36,6 +36,9 @@ jobs:
|
|||||||
# echo $url_line
|
# echo $url_line
|
||||||
url=$(echo "$url_line"|cut -d '(' -f2 | cut -d ')' -f1|sed 's/\.git$//')
|
url=$(echo "$url_line"|cut -d '(' -f2 | cut -d ')' -f1|sed 's/\.git$//')
|
||||||
path=$(echo "$url_line"|cut -d':' -f1 | cut -d'/' -f2-)
|
path=$(echo "$url_line"|cut -d':' -f1 | cut -d'/' -f2-)
|
||||||
|
if [[ "$url" == "https://platform.openai.com/api-keys"* ]]; then
|
||||||
|
echo "Link "$url" from ${{github.workspace}}/$path needs to be verified by a real person."
|
||||||
|
else
|
||||||
sleep $delay
|
sleep $delay
|
||||||
response=$(curl -L -s -o /dev/null -w "%{http_code}" "$url")|| true
|
response=$(curl -L -s -o /dev/null -w "%{http_code}" "$url")|| true
|
||||||
if [ "$response" -ne 200 ]; then
|
if [ "$response" -ne 200 ]; then
|
||||||
@@ -48,6 +51,7 @@ jobs:
|
|||||||
fail="TRUE"
|
fail="TRUE"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user