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
4 changes: 2 additions & 2 deletions skills/poteto-mode/scripts/watch-pr/github.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ it("annotates automated-reviewer threads with distinct review-pass counts", () =
createdAt: "now",
path: "a.ts",
line: 1,
author: { login: "bugbot" },
author: { login: "factory-droid[bot]" },
},
],
},
Expand Down Expand Up @@ -274,7 +274,7 @@ it("annotates automated-reviewer threads with distinct review-pass counts", () =
createdAt: "now",
path: null,
line: null,
author: { login: "bugbot" },
author: { login: "factory-droid[bot]" },
},
],
},
Expand Down
8 changes: 1 addition & 7 deletions skills/poteto-mode/scripts/watch-pr/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,16 +329,10 @@ function parseComment(value: unknown): T.ReviewComment {
function isBugbot(comment: T.ReviewComment | null): boolean {
if (comment === null) return false;
const author = (comment.authorLogin ?? "").toLowerCase();
// droid-action identifies its own comments the same way: the Factory Droid
// GitHub App posts as factory-droid[bot], so a login containing "droid"
// marks the automated reviewer.
return author.includes("bugbot") || author.includes("droid");
return author === "factory-droid[bot]";
}
function passKey(comment: T.ReviewComment | null): string | null {
if (comment === null) return null;
// The automated reviewer leaves no run marker in comment bodies, so keys
// only come from automations that emit one; keyless threads count a single
// pass in buildReviewThreads.
const match = /RUN_ID:\s*([a-zA-Z0-9_.:-]+)/.exec(comment.body);
return match?.[1] ?? null;
}
Expand Down
Loading