Skip to content

Instantly share code, notes, and snippets.

@ange-daumal
Created June 5, 2025 16:11
Show Gist options
  • Save ange-daumal/1e423b377f142752cd1482122b90fe56 to your computer and use it in GitHub Desktop.
Save ange-daumal/1e423b377f142752cd1482122b90fe56 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Define target repositories
REPOS=("algolia/python" "algolia/go")
echo "🔍 Listing open PRs with review requested for you or your team..."
for REPO in "${REPOS[@]}"; do
echo -e "\n📦 Repository: $REPO"
# Get PR numbers, titles, and URLs
gh pr list \
--repo "$REPO" \
--state open \
--search "review-requested:@me" \
--json number,title,url \
--jq '.[] | [.number, .title, .url] | @tsv' |
while IFS=$'\t' read -r number title url; do
# Exclude PRs starting with "chore(deps):"
if [[ "$title" =~ ^chore\(deps\): ]]; then
continue
fi
# Check if it's a draft
is_draft=$(gh pr view "$number" --repo "$REPO" --json isDraft --jq '.isDraft')
# Display accordingly
if [[ "$is_draft" == "true" ]]; then
echo "[DRAFT] $title$url"
else
echo "$title$url"
fi
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment