Skip to content

Commit

Permalink
Trying something
Browse files Browse the repository at this point in the history
  • Loading branch information
rmanaem committed Aug 24, 2024
1 parent af9e3e0 commit 9a9f19f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/fetch-repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ fetch_repos() {
# Fetch all repositories
while true; do
RESPONSE=$(fetch_repos)

# Debug: Print the RESPONSE to see what is being returned
echo "RESPONSE: $RESPONSE" # Debugging line

# Check if the RESPONSE is valid JSON before parsing
if echo "$RESPONSE" | jq -e . >/dev/null 2>&1; then
Expand All @@ -46,6 +49,9 @@ while true; do
# Fetch the contents of the annotations repository
FILE_RESPONSE=$(curl -s -H "Authorization: token $GH_TOKEN" "https://api.github.com/repos/$ANNOTATIONS_REPO/contents/${JSONLD_FILE}")

# Debug: Print the FILE_RESPONSE to see what is being returned
echo "FILE_RESPONSE for $JSONLD_FILE: $FILE_RESPONSE" # Debugging line

# Check if the FILE_RESPONSE is valid JSON before parsing
if echo "$FILE_RESPONSE" | jq -e . >/dev/null 2>&1; then
FILE_EXISTS=$(echo "$FILE_RESPONSE" | jq -r '.name // empty')
Expand Down

0 comments on commit 9a9f19f

Please sign in to comment.