Skip to content

Commit b70cf41

Browse files
authored
Merge pull request #85 from cardmagic/fix/context7-refresh-json
ci: read the Context7 error field with jq
2 parents 787e672 + 7fb9c33 commit b70cf41

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎.github/workflows/context7-refresh.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
if [ "$status" = "200" ]; then
3434
exit 0
3535
fi
36-
if [ "$status" = "400" ] && grep -q '"error":"too-early"' response.json; then
36+
if [ "$status" = "400" ] && jq -e '.error == "too-early"' response.json > /dev/null; then
3737
echo "::notice::Context7 refreshed $LIBRARY_NAME recently, so it skipped this refresh."
3838
exit 0
3939
fi

0 commit comments

Comments
 (0)