- Update `scripts/review_pull_requests.py` to compare against `origin/main` instead of local `main`. This ensures accurate identification of unmerged branches in CI/CD environments and shallow clones.
- Ensure `get_all_branch_details` returns a structure fully compatible with `get_branch_info` (added `commits: []`), preventing potential KeyErrors.
- This change enables the script to correctly process 150+ branches in <0.5s by leveraging `git for-each-ref` (O(1) git call) instead of falling back to per-branch `git log` (O(N) git calls).
Replaced per-branch git log calls with a single git for-each-ref command using the ahead-behind atom. This optimizes the script from O(N) to O(1) git subprocess calls.
Co-authored-by: Mouy-leng <199350297+Mouy-leng@users.noreply.github.com>