Commit graph

5 commits

Author SHA1 Message Date
google-labs-jules[bot]
9b56792564 feat: optimize git branch analysis to avoid N+1 subprocess calls
- Renamed `get_all_branch_details` to `get_unmerged_branch_details` to clarify intent.
- Updated `get_prs_via_git` to only fetch merged branches, delegating open branch fetching to `get_unmerged_branch_details`.
- Refactored `main` to populate `open_branches` from `get_unmerged_branch_details` keys, avoiding redundant git calls and eliminating N+1 `git rev-list` calls in the fallback path.
- Added explicit safety check `if ahead == 0: continue` to `get_unmerged_branch_details` to guarantee merged branches are filtered out.
- Sorted open branches by commit date for better readability.
2026-02-13 05:31:27 +00:00
google-labs-jules[bot]
1b82a2865d Optimize branch analysis in PR review script
- Modified `scripts/review_pull_requests.py` to filter `git for-each-ref` output by unmerged branches.
- Reduces algorithmic complexity from O(N) to O(M) where N is total branches and M is active branches.
- Avoids expensive `ahead-behind` calculations for potentially thousands of stale merged branches.
2026-02-09 05:06:55 +00:00
google-labs-jules[bot]
92e5a0540b perf: optimize PR review script using git rev-list
- Replaced O(N) `git log` parsing with O(1) `git rev-list --count` for branch commit counts.
- Updated `get_all_branch_details` to return an empty `commits` list to ensure consistent data structure with `get_branch_info`, preventing potential runtime errors.
- Changed base branch reference from `main` to `origin/main` to support CI/CD environments and shallow clones where local `main` might be missing.
- Removed unused `commits` list generation in `get_branch_info` to improve fallback performance.
2026-02-08 05:36:14 +00:00
google-labs-jules[bot]
fc5646a73c Refactor review_pull_requests.py to batch 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>
2026-01-27 01:10:00 +00:00
Huawei-Window-Techno
365881c76a feat: Add pull request review script and comprehensive report - Created review_pull_requests.py to analyze all PRs - Generated Pull Request Review Report with 23 open PRs analysis - Identified 20 performance optimization PRs ready for review - Documented 5 draft PRs and 2 WIP feature PRs - Added recommendations for PR consolidation and prioritization 2026-01-10 05:26:35 +07:00