Robust Scale-Safe Lifecycle Consolidation#26355
Conversation
This PR consolidates fragmented repository maintenance workflows into a single, scale-safe lifecycle manager and optimizes existing triage queries.
## Changes
### 1. Scale-Safe Lifecycle Management (`gemini-lifecycle-manager.yml`)
- Refactored `processItems` to use `github.rest.search.issuesAndPullRequests` with a fixed `per_page: 100` and **no pagination**.
- This ensures that even with a large backlog (e.g., 5,000+ issues), the workflow only processes a manageable batch of items per daily run, preventing N+1 query failures and hitting GitHub API rate limits.
- The consolidated manager now handles:
- **No-Response Closure**: Closes items with `status/need-information` after 14 days of inactivity.
- **Actor-Aware Label Removal**: Automatically removes `status/need-information` only when the contributor (author) responds, ignoring maintainer pings.
- **Stale Management**: Marks items as stale after 60 days of inactivity and closes them after 14 additional days.
- **PR Contribution Policy**: Implements a 2-stage policy for non-roadmap PRs (7-day nudge, 14-day closure).
### 2. Optimized Issue Triage (`gemini-scheduled-issue-triage.yml`)
- Updated search queries to exclude `status/bot-triaged` labels.
- This prevents redundant re-processing of issues that have already been analyzed by Gemini, saving API budget and compute time.
### 3. Workflow Consolidation
- Deleted 5 redundant legacy workflows:
- `gemini-scheduled-stale-issue-closer.yml`
- `gemini-scheduled-stale-pr-closer.yml`
- `no-response.yml`
- `stale.yml`
- `pr-contribution-guidelines-notifier.yml`
## Impact
- **Stability**: Prevents workflow timeouts and rate-limiting on repositories with large backlogs.
- **Maintainability**: Centralizes lifecycle policies into a single, well-commented configuration.
- **Efficiency**: Reduces redundant triage processing and API calls.
- **Contributor Experience**: Provides clear, actor-aware feedback and graceful PR closure nudges.
|
Size Change: -4 B (0%) Total Size: 34 MB
ℹ️ View Unchanged
|
|
@gemini-cli please fix the linter issues. Do not make any other changes. |
|
I've fixed the linter issues in Changes:
No other changes were made to the PR. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request streamlines repository maintenance by consolidating multiple disparate workflows into a single, robust lifecycle manager. By implementing scale-safe batch processing and optimizing triage queries, the changes improve overall system stability and reduce unnecessary API consumption, while providing a more consistent experience for contributors. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a lifecycle management script for issues and pull requests, automating tasks such as marking stale items and enforcing contribution policies. The review feedback points out potential runtime errors when handling deleted user accounts and suggests refining the PR nudge logic to prevent overlapping notifications.
- Added optional chaining to `user.type` checks to prevent errors when accounts are deleted. - Restricted the PR nudge query time range to prevent overlap with the closure query. - Added `sort: 'updated'` and `order: 'asc'` to the search API call to properly iterate through backlogs. - Added missing `actions/checkout` step to the workflow.
|
I have pushed a commit that addresses all the feedback:
Please let me know if there's anything else needed! |
Robust Scale-Safe Lifecycle Consolidation
This PR consolidates fragmented repository maintenance workflows into a single, scale-safe lifecycle manager and optimizes existing triage queries.
Changes
1. Scale-Safe Lifecycle Management (
gemini-lifecycle-manager.yml)processItemsto usegithub.rest.search.issuesAndPullRequestswith a fixedper_page: 100and no pagination.status/need-informationafter 14 days of inactivity.status/need-informationonly when the contributor (author) responds, ignoring maintainer pings.2. Optimized Issue Triage (
gemini-scheduled-issue-triage.yml)status/bot-triagedlabels.3. Workflow Consolidation
gemini-scheduled-stale-issue-closer.ymlgemini-scheduled-stale-pr-closer.ymlno-response.ymlstale.ymlpr-contribution-guidelines-notifier.ymlImpact