Skip to content

Fix docs path exclusion to use recursive wildcard in azure-pipelines-PR.yml#19848

Open
Copilot wants to merge 3 commits into
mainfrom
copilot/update-azure-pipelines-path-filters
Open

Fix docs path exclusion to use recursive wildcard in azure-pipelines-PR.yml#19848
Copilot wants to merge 3 commits into
mainfrom
copilot/update-azure-pipelines-path-filters

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 28, 2026

docs/* only excludes direct children of docs/, so changes to nested paths like docs/release-notes/foo.md were still triggering CI builds.

Change

Replace docs/* with docs/** in both trigger.paths.exclude and pr.paths.exclude:

exclude:
  - docs/**   # was: docs/*

** matches at any nesting depth, so all changes under docs/ are now correctly excluded from both push and PR triggers.

Original prompt

Update azure-pipelines-PR.yml in dotnet/fsharp so changes anywhere under /docs/, at any nesting depth, are excluded from triggering CI.

Current file uses docs/* in path exclusions, which can miss nested paths like docs/release-notes/.... Change the docs path exclusion under both the trigger.paths.exclude and pr.paths.exclude sections to use a recursive wildcard such as docs/**.

Scope:

  • Modify only the Azure Pipelines path filters needed for this behavior.
  • Ensure both CI triggers and PR triggers exclude all nested paths under docs/.
  • Preserve existing formatting and unrelated exclusions.

Acceptance criteria:

  • trigger.paths.exclude contains docs/** instead of docs/*.
  • pr.paths.exclude contains docs/** instead of docs/*.
  • No unrelated pipeline behavior is changed.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Why are file changes inside docs/release-notes or so still causing a CI re-run ? Do we need different wildcard for nested subpaths?

Assistant: Yes — use a recursive path pattern. In this file, docs/* is likely only excluding direct children of docs, not nested files like docs/release-notes/foo.md. For nested subpaths, use docs/** or, if you only want that area, docs/release-notes/**.

Update both trigger.paths.exclude and pr.paths.exclude:

trigger:
  paths:
    include:
    - '*'
    exclude:
    - .github/**
    - docs/**
    - .vscode/**
    - .devcontainer/**
    - tests/scripts/**
    - attributions.md
    - CODE_OF_CONDUCT.md
    - DEVGUIDE.md
    - INTERNAL.md
    - Language-Version-History.md
    - License.txt
    - README.md
    - release-notes.md
    - TESTGUIDE.md

pr:
  paths:
    include:
    - '*'
    exclude:
    - .github/**
    - docs/**
    - .vscode/**
    - .devcontainer/**
    - tests/scripts/**
    - attributions.md
    - CODE_OF_CONDUCT.md
    - DEVGUIDE.md
    - INTERNAL.md
    - Language-Version-History.md
    - License.txt
    - README.md
    - release-notes.md
    - TESTGUIDE.md

Azure Pipelines supports **, *, and ? in path filters, and Microsoft’s docs specifically show ** for recursive matching like src/app/**/myapp*. Paths are repo-root-relative, case-sensitive, and include filters are processed before excludes; order does not matter. (learn.microsoft.com)

A few gotchas:

  • release-notes.md only excludes the root file release-notes.md; it does not exclude docs/release-notes/....
  • If a PR changes both docs/release-notes/... and some non-excluded file, CI will still run.
  • For GitHub PR validation, Azure evaluates the YAML from the PR merge result, so a PR changing the YAML can affect its own trigger behavior. (learn.microsoft.com)
  • If Azure is correctly skipping due to path filters, GitHub may still receive a neutral status rather than a full build. (learn.microsoft.com)

User: Can you raise a PR changing that? Anything under /docs/, no matter how deep, should be excluded from triggering CI run

Assistant: I’m waiting for your confirmation to proceed with creating the PR.

This pull request was created from Copilot chat.

Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com>
Copilot AI changed the title [WIP] Update path filters in azure-pipelines-PR.yml to exclude nested docs paths Fix docs path exclusion to use recursive wildcard in azure-pipelines-PR.yml May 28, 2026
Copilot finished work on behalf of T-Gro May 28, 2026 14:40
Copilot AI requested a review from T-Gro May 28, 2026 14:40
Copy link
Copy Markdown
Member

@T-Gro T-Gro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — the change is correct and well-scoped.

One optional follow-up: the same single-star limitation applies to .github/, .vscode/, .devcontainer/, and ests/scripts/ in both sections. If any of those directories have nested content (e.g. .github/workflows/*.yml), they'd also benefit from **. Feel free to address in a separate PR or ignore if those dirs are flat today.

@T-Gro T-Gro added the AI-reviewed PR reviewed by AI review council label May 28, 2026
@T-Gro T-Gro self-requested a review May 28, 2026 15:00
@github-actions
Copy link
Copy Markdown
Contributor

✅ No release notes required

@T-Gro T-Gro marked this pull request as ready for review May 28, 2026 16:36
@T-Gro T-Gro requested a review from a team as a code owner May 28, 2026 16:36
@T-Gro T-Gro enabled auto-merge (squash) May 28, 2026 16:36
@T-Gro T-Gro requested a review from abonie May 28, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-reviewed PR reviewed by AI review council

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

2 participants