Commit Graph

3 Commits

Author SHA1 Message Date
gemini-cli[bot] ff16896735 # PR Description: Scale-Safe Lifecycle Management & Graceful PR Closure
## What the change is
- Refactored `gemini-lifecycle-manager.cjs` to include strict batch limits:
    - Global limit of 300 items per execution.
    - Per-query limit of 50 items.
- Optimized N+1 query vulnerability by checking `item.comments` before calling `listComments`.
- Switched PR lifecycle to a state-based approach:
    - **Nudge**: Applied to PRs older than 7 days without the `status/pr-nudge-sent` label.
    - **Closure**: Applied to PRs with the `status/pr-nudge-sent` label that have not been updated in at least 7 days.
- Switched search to use `github.paginate.iterator` for efficient, limit-aware processing.

## Why it is recommended
- **Scale Safety**: Prevents the script from making unbounded sequential API calls, which would hit GitHub rate limits and cause workflow timeouts in large repositories.
- **Graceful Closure**: Ensures that every PR contributor receives a full 7-day grace period after a nudge, regardless of how often the automation script runs.
- **Efficiency**: Reduces unnecessary API calls for items with no comments, saving GitHub Actions minutes and API quota.

## Expected impact
- Improved reliability of the lifecycle automation.
- Guaranteed 7-day grace period for PR contributors.
- Safe backlog processing without hitting secondary rate limits.
- Reduced noise from ungraceful PR closures.
2026-05-05 02:45:32 +00:00
Christian Gunderman 04e875c5c8 fix(ci): respect exempt labels when closing stale items (#26475) 2026-05-04 23:00:14 +00:00
gemini-cli-robot a79da4f3a9 Robust Scale-Safe Lifecycle Consolidation (#26355)
Co-authored-by: gemini-cli[bot] <gemini-cli[bot]@users.noreply.github.com>
Co-authored-by: Christian Gunderman <gundermanc@google.com>
2026-05-04 22:07:47 +00:00