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 {