From f6a5282bae07ad4888304c4836db179bfc662917 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 24 Jul 2026 15:38:47 +0000 Subject: [PATCH] chore: update external notifier to skip draft PRs Co-authored-by: timotheeguerin <1031227+timotheeguerin@users.noreply.github.com> --- .github/policies/prs.external-reviewers.generated.yml | 1 + eng/common/scripts/labels/automation.ts | 2 +- eng/common/scripts/labels/policy.ts | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/policies/prs.external-reviewers.generated.yml b/.github/policies/prs.external-reviewers.generated.yml index 404ceb92720..6ec4283ae20 100644 --- a/.github/policies/prs.external-reviewers.generated.yml +++ b/.github/policies/prs.external-reviewers.generated.yml @@ -21,6 +21,7 @@ configuration: - not: hasLabel: label: emitter:graphql + - not: isDraft then: - addReply: reply: "@fionabronwen @swatkatz @steverice — this PR modifies files in the diff --git a/eng/common/scripts/labels/automation.ts b/eng/common/scripts/labels/automation.ts index 81f73be4323..307f528db30 100644 --- a/eng/common/scripts/labels/automation.ts +++ b/eng/common/scripts/labels/automation.ts @@ -177,7 +177,7 @@ function createExternalReviewersConfig(config: RepoConfig): PolicyServiceConfig // on every subsequent push (the prs.triage policy also adds it, but adding // it here guarantees the guard is set even if that policy hasn't run yet). return { - if: [includesModifiedFiles(globs), not(hasLabel(area))], + if: [includesModifiedFiles(globs), not(hasLabel(area)), not("isDraft")], then: [ addReply( `${mentions} — this PR modifies files in the \`${area}\` area, which your team owns. Please take a look. (You can't be added as a formal reviewer because you're not a repository collaborator, so this is a heads-up instead.)`, diff --git a/eng/common/scripts/labels/policy.ts b/eng/common/scripts/labels/policy.ts index af6a1248dae..aae02f6990c 100644 --- a/eng/common/scripts/labels/policy.ts +++ b/eng/common/scripts/labels/policy.ts @@ -90,7 +90,8 @@ export type Condition = | And | Not | "isAssignedToSomeone" - | "isOpen"; + | "isOpen" + | "isDraft"; export function payloadType(payloadType: PayloadType["payloadType"]): PayloadType { return {