Commit b1cf5d2c authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Debug

parent ebc396d4
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -36,10 +36,8 @@ echo "" > "$LOG_FILE" # Start fresh

# ==== Loop over paginated branch list ====
while true; do
  echo "Fetching page $page... from $1/projects/$PROJECT_ID/repository/branches"
  curl --silent --header "PRIVATE-TOKEN: $PRIVATE_TOKEN" "$1/projects/$PROJECT_ID/repository/branches?page=$page" | jq
  response=$(curl --silent --header "PRIVATE-TOKEN: $PRIVATE_TOKEN" \
    "$1/projects/$PROJECT_ID/repository/branches?page=$page")
    "$1/projects/$2/repository/branches?page=$page")

  count=$(echo "$response" | jq length)
  if [ "$count" -eq 0 ]; then