#!/bin/bash
exec > /tmp/botfix/hunt_out.txt 2>&1
echo "=== bot users ==="
for u in gautam-gemini gautam-chatgpt gautam-claude; do
  echo "--- $u ---"
  gh api "users/$u" 2>&1 | head -c 600
  echo ""
done
echo "=== who am I, scopes ==="
gh auth status 2>&1
echo "=== all repos I can access (affiliation owner,collaborator,org) ==="
gh api "user/repos?per_page=100&affiliation=owner,collaborator,organization_member" --jq '.[].full_name' 2>&1
echo "=== search by name across github ==="
gh search repos "codex-pr-reviewer" --limit 30 2>&1
echo "=== gbharg user repos via api incl all ==="
gh api "users/gbharg/repos?per_page=100&type=all" --jq '.[].full_name' 2>&1
echo "DONE_EXIT_OK"
