From c428c4c95598bc362a02209002d4af2ffcd5301f Mon Sep 17 00:00:00 2001 From: "gemini-cli[bot]" Date: Mon, 4 May 2026 18:19:58 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Gemini=20Bot=20Productivity=20Op?= =?UTF-8?q?timizations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gemini-lifecycle-manager.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/gemini-lifecycle-manager.yml b/.github/workflows/gemini-lifecycle-manager.yml index 0ac542310d..9a921167a7 100644 --- a/.github/workflows/gemini-lifecycle-manager.yml +++ b/.github/workflows/gemini-lifecycle-manager.yml @@ -21,8 +21,8 @@ permissions: jobs: manage-lifecycle: - if: github.repository == 'google-gemini/gemini-cli' - runs-on: ubuntu-latest + if: "github.repository == 'google-gemini/gemini-cli'" + runs-on: 'ubuntu-latest' steps: - name: 'Generate GitHub App Token' id: 'generate_token' @@ -131,16 +131,14 @@ jobs: } }); - // 4. Handle PR Contribution Policy (Nudge at 7d, Close at 14d) + // 4. Handle PR Contribution Policy (Nudge at 7d, Close at 7d after nudge) const PR_NUDGE_DAYS = 7; - const PR_CLOSE_DAYS = 14; const nudgeThreshold = new Date(now.getTime() - (PR_NUDGE_DAYS * 24 * 60 * 60 * 1000)); - const prCloseThreshold = new Date(now.getTime() - (PR_CLOSE_DAYS * 24 * 60 * 60 * 1000)); // Nudge await processItems(`repo:${owner}/${repo} is:open is:pr -label:"help wanted" -label:"🔒 maintainer only" -label:"status/pr-nudge-sent" created:<${nudgeThreshold.toISOString()}`, async (pr) => { if (['OWNER', 'MEMBER', 'COLLABORATOR'].includes(pr.author_association) || pr.user.type === 'Bot') return; - + core.info(`Nudging PR #${pr.number} for contribution policy.`); if (!dryRun) { await github.rest.issues.addLabels({ owner, repo, issue_number: pr.number, labels: ['status/pr-nudge-sent'] }); @@ -152,10 +150,10 @@ jobs: }); // Close - await processItems(`repo:${owner}/${repo} is:open is:pr -label:"help wanted" -label:"🔒 maintainer only" created:<${prCloseThreshold.toISOString()}`, async (pr) => { + await processItems(`repo:${owner}/${repo} is:open is:pr label:"status/pr-nudge-sent" -label:"help wanted" -label:"🔒 maintainer only" updated:<${nudgeThreshold.toISOString()}`, async (pr) => { if (['OWNER', 'MEMBER', 'COLLABORATOR'].includes(pr.author_association) || pr.user.type === 'Bot') return; - - core.info(`Closing PR #${pr.number} per contribution policy (no 'help wanted').`); + + core.info(`Closing PR #${pr.number} per contribution policy (no 'help wanted' and grace period elapsed).`); if (!dryRun) { await github.rest.issues.createComment({ owner, repo, issue_number: pr.number,