From da85dea2a6b99ef31f34a25344861a77a2b45d0c Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Fri, 23 Oct 2026 04:19:46 -0400 Subject: [PATCH] fix: skip deploy previews for sec/, outreach/, ops/ and automation/ bot branches Closes #426 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- changelog.d/fixed-426-deploy-preview-ignore-bot-prefixes.md | 1 + netlify.toml | 2 +- src/__tests__/netlify-deploy-preview-ignore.test.ts | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelog.d/fixed-426-deploy-preview-ignore-bot-prefixes.md diff --git a/changelog.d/fixed-426-deploy-preview-ignore-bot-prefixes.md b/changelog.d/fixed-426-deploy-preview-ignore-bot-prefixes.md new file mode 100644 index 0000000..502f077 --- /dev/null +++ b/changelog.d/fixed-426-deploy-preview-ignore-bot-prefixes.md @@ -0,0 +1 @@ +- Skip Netlify deploy previews for `sec/*`, `outreach/*`, `ops/*` and `automation/*` bot branches as well (#426). diff --git a/netlify.toml b/netlify.toml index bbb3ec8..8679a7a 100644 --- a/netlify.toml +++ b/netlify.toml @@ -48,7 +48,7 @@ # quota (#419). Production builds of main are unaffected: this rule only # applies in the deploy-preview context. exit 0 = skip, exit 1 = build. [context.deploy-preview] - ignore = "case \"${HEAD:-$BRANCH}\" in arch/*|scanner/*|quality/*|hive/*|dependabot/*) exit 0;; *) exit 1;; esac" + ignore = "case \"${HEAD:-$BRANCH}\" in arch/*|scanner/*|quality/*|sec/*|outreach/*|ops/*|automation/*|hive/*|dependabot/*) exit 0;; *) exit 1;; esac" # Enable branch deploys for documentation versioning # Version branches follow the pattern: docs/{version} diff --git a/src/__tests__/netlify-deploy-preview-ignore.test.ts b/src/__tests__/netlify-deploy-preview-ignore.test.ts index 3d108d7..8f5526b 100644 --- a/src/__tests__/netlify-deploy-preview-ignore.test.ts +++ b/src/__tests__/netlify-deploy-preview-ignore.test.ts @@ -66,6 +66,10 @@ describe("netlify.toml [context.deploy-preview] ignore", () => { "arch/docs", "scanner/fix-419", "quality/test-netlify-ignore", + "sec/fix-markdown-it-15-0-3", + "outreach/docs-issue-forms", + "ops/runbook-healthz-field", + "automation/meeting-recordings-refresh", "hive/forward-merge", "dependabot/npm_and_yarn/next-16.4.1", ])("skips the preview for bot branch %s", head => { @@ -81,6 +85,7 @@ describe("netlify.toml [context.deploy-preview] ignore", () => { // the patterns are anchored to the start of the branch name. "feat/scanner/dashboard", "myquality/notes", + "myops/notes", ])("builds the preview for non-bot branch %s", head => { expect(runIgnore(ignore!, { HEAD: head, BRANCH: head })).toBe(BUILD); });