Skip to content
Closed
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
2 changes: 1 addition & 1 deletion docs/pr-review-fix-queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Configuration:

| Env Var | Description | Default |
|---------|-------------|---------|
| `PR_FOLLOWUP_BOT_IDENTITIES` | Comma-separated GitHub logins whose PRs are eligible | `github-actions[bot]` |
| `PR_FOLLOWUP_BOT_IDENTITIES` | Comma-separated GitHub logins whose PRs are eligible | `github-actions[bot]`, `itsmiso-ai` |
| `PR_FOLLOWUP_BRANCH_OWNERS` | Comma-separated repo owners allowed for queueing | All (opt-in safety) |

### Real-time webhooks
Expand Down
9 changes: 9 additions & 0 deletions src/lib/pr-followup-ingestion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@ describe("isAllowedBotAuthor", () => {
expect(isAllowedBotAuthor(undefined)).toBe(false);
});

it("defaults to itsmiso-ai + github-actions[bot] when env var is unset", () => {
delete process.env.PR_FOLLOWUP_BOT_IDENTITIES;
expect(isAllowedBotAuthor("itsmiso-ai")).toBe(true);
expect(isAllowedBotAuthor("github-actions[bot]")).toBe(true);
// Other bots still rejected by default
expect(isAllowedBotAuthor("app/smurf-bot")).toBe(false);
expect(isAllowedBotAuthor("random-bot")).toBe(false);
});

afterEach(() => {
delete process.env.PR_FOLLOWUP_BOT_IDENTITIES;
});
Expand Down
13 changes: 10 additions & 3 deletions src/lib/pr-followup-ingestion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,16 @@ export interface PrFollowupConfig {
/** Classification result from feedback analysis */
export type FeedbackClassification = "actionable" | "needs_human";

// ─── Default config (no hardcoded agent names or repo names) ────────────────

const DEFAULT_BOT_IDENTITIES: BotIdentity[] = ["github-actions[bot]"];
// ─── Default config ─────────────────────────────────────────────────────────
// The default bot allowlist is intentionally narrow. Operators should set
// `PR_FOLLOWUP_BOT_IDENTITIES` (comma-separated GitHub logins) to match the
// bots that author their agent PRs. Without that env var, the merge-conflict
// surfacing and other PR-followup ingestion paths will silently no-op.
//
// `itsmiso-ai` is included by default because that is the Miso author identity
// for the current `misospace/*` agent fleet. The env var still wins when set.

const DEFAULT_BOT_IDENTITIES: BotIdentity[] = ["github-actions[bot]", "itsmiso-ai"];

function getConfig(): PrFollowupConfig {
const rawIdentities = process.env.PR_FOLLOWUP_BOT_IDENTITIES;
Expand Down