Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions packages/junior-github/src/pull-request-action-backfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -33,7 +34,11 @@ import {
export const GITHUB_PULL_REQUEST_ACTION_BACKFILL_TASK =
"backfillPullRequestActions";

const VERSION = "v1";
const VERSION = "v2";
Comment thread
cursor[bot] marked this conversation as resolved.
Resolved
// 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;
Comment thread
sentry-junior[bot] marked this conversation as resolved.
Resolved
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.
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 4 additions & 2 deletions packages/junior-github/tests/pull-request-limbo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" }],
},
Expand Down Expand Up @@ -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: [
{
Expand Down
Loading