diff --git a/packages/junior-github/src/pull-request-action-backfill.ts b/packages/junior-github/src/pull-request-action-backfill.ts index 929d5268f99..46f9f73f6a7 100644 --- a/packages/junior-github/src/pull-request-action-backfill.ts +++ b/packages/junior-github/src/pull-request-action-backfill.ts @@ -16,7 +16,8 @@ * page with a pull request that a webhook was checking runs again, because * that webhook does not ask a requester who acted before the last push. Bump * `VERSION` when a new derivation rule must reach pull requests that went - * quiet before it. + * quiet before it, and set `ASK_AFTER_REQUESTER_ACTED` to whether the rule + * needs that ask. */ import type { PluginStartedTaskDefinition, @@ -33,7 +34,11 @@ import { export const GITHUB_PULL_REQUEST_ACTION_BACKFILL_TASK = "backfillPullRequestActions"; -const VERSION = "v1"; +const VERSION = "v2"; +// v1 brought limbo asks to quiet pull requests, also where the requester +// acted before the last push. v2 brings only the merge access rule, so it +// asks in limbo as a webhook does. +const ASK_AFTER_REQUESTER_ACTED = false; const CURSOR_KEY = `pull-request-action-backfill:${VERSION}:cursor`; const DONE_KEY = `pull-request-action-backfill:${VERSION}:done`; // How often a page ran again, so its next run has a new task key. @@ -84,7 +89,7 @@ export function githubPullRequestActionBackfillTask(args: { .sort((a, b) => a.id - b.id) .slice(0, PAGE_SIZE); const busy = await syncGitHubPullRequestActions({ - askAfterRequesterActed: true, + askAfterRequesterActed: ASK_AFTER_REQUESTER_ACTED, ...startedTaskSyncContext(ctx, { botEmail: args.botEmail(), env: args.env, diff --git a/packages/junior-github/tests/pull-request-limbo.test.ts b/packages/junior-github/tests/pull-request-limbo.test.ts index f2339877225..2e8e2ba598e 100644 --- a/packages/junior-github/tests/pull-request-limbo.test.ts +++ b/packages/junior-github/tests/pull-request-limbo.test.ts @@ -147,7 +147,9 @@ describe("limbo review ask", () => { }>([ { asks: true, github: {}, name: "waits on nobody" }, { - asks: true, + // The v2 backfill asks as a webhook does, so it does not ask a + // requester who acted before the last push again. + asks: false, github: { comments: [{ at: "2026-07-02T11:00:00.000Z", login: "Requester" }], }, @@ -239,7 +241,7 @@ describe("limbo review ask", () => { name: "a comment-only review answers no ask, but Junior acts next", }, { - asks: true, + asks: false, github: { reviews: [ {