Exclude .github/CODEOWNERS (and .github/**) from CI triggers across all AzDO pipelines#13642
Draft
Copilot wants to merge 2 commits into
Draft
Exclude .github/CODEOWNERS (and .github/**) from CI triggers across all AzDO pipelines#13642Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Contributor
|
Hello @copilot, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo. |
…net.yml and .vsts-dotnet-exp-perf.yml Agent-Logs-Url: https://github.com/dotnet/msbuild/sessions/6e72ed82-a8aa-4a66-bfff-43ef633d3744 Co-authored-by: baronfel <573979+baronfel@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update Azure DevOps pipeline YAML to exclude CODEOWNERS changes from CI
Exclude .github/CODEOWNERS (and .github/**) from CI triggers across all AzDO pipelines
Apr 28, 2026
Comment on lines
+6
to
+9
| paths: | ||
| exclude: | ||
| - documentation/** | ||
| - .github/** |
Member
There was a problem hiding this comment.
I don't think we can do this, because we have a required check that the PR builds pass. Won't this result in PRs stuck on that check without ever triggering a build? @copilot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
PR #13214 added
documentation/**and.github/**path exclusions to.vsts-dotnet-ci.yml, but two other push-triggered pipelines still had simple trigger lists with no path filtering, causing full CI runs on CODEOWNERS-only changes.Changes Made
.vsts-dotnet.yml— Converted simpletriggerlist to structured format; addedpaths.excludefordocumentation/**and.github/**azure-pipelines/.vsts-dotnet-exp-perf.yml— Same treatment forexp/*/perf/*triggersazure-pipelines/check-documentation-only-change.yml— Added comment clarifying that.github/CODEOWNERSis already matched by the existing^\.github/pattern (no logic change)Push triggers now skip CI for
.github/CODEOWNERS(and all.github/**/documentation/**) changes across all three active push-triggered pipelines. PR triggers are intentionally left unchanged so required checks continue to satisfy branch protection; thecheck-documentation-only-change.ymltemplate already gates expensive test jobs viaonlyDocChanged.Testing
No executable code changed — YAML-only.
Notes
Pipelines with
trigger: none(vs-insertion.yml,vmr-sb-validation.yml) are unaffected.Original prompt
Update Azure DevOps pipeline YAML configuration in
dotnet/msbuildso that changes toCODEOWNERSdo not trigger CI pipelines.Context:
trigger.paths.excludefordocumentation/**and.github/**in.vsts-dotnet-ci.yml(push CI only) and expandedazure-pipelines/check-documentation-only-change.ymlto treat.github/changes as non-build files while keepingonlyDocChangedvariable.CODEOWNERSchanges to not trigger AzDO pipelines, and we want this applied across all pipelines in the repo (not just.vsts-dotnet-ci.yml).Requirements:
.vsts-*.yml,azure-pipelines*.yml, files underazure-pipelines/, and any other YAMLs that contain top-leveltrigger:and/orpr:blocks)..github/CODEOWNERSdo not start CI runs.trigger.paths.excludefor.github/CODEOWNERS..github/**, ensure.github/CODEOWNERSis covered; otherwise add a specific exclusion.trigger:(push) andpr:filters. Align with repo policy from PR Exclude documentation and .github from CI triggers #13214: push triggers may exclude non-build-only changes, while PR builds may still need to run to satisfy required checks. If CODEOWNERS-only PRs still must pass required checks, implement repo’s existing “non-build-only change” gate to early-exit expensive jobs instead of excluding PR triggers entirely.azure-pipelines/check-documentation-only-change.yml) so that CODEOWNERS-only changes are considered non-build-only, and downstream jobs can skip expensive test runs.onlyDocChanged) remains unchanged..github/CODEOWNERS.Deliverable:
mainwith all required YAML/template updates.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: CodeOwners changes in the MSBuild repo shouldn't trigger CI pipelines in azdo
Assistant: To prevent CODEOWNERS-only changes from triggering Azure DevOps (AzDO) pipelines for
dotnet/msbuild, you need to add a path-based exclusion for.github/CODEOWNERSin your AzDO pipeline triggers.If the pipeline is defined in YAML
In the relevant
azure-pipelines.yml(or any YAML that defines CI triggers), add apaths.excludeentry:If you also have PR validation triggers, exclude it there too:
If the pipeline is “classic” (UI-defined) instead of YAML
In Pipeline → Edit → Triggers, add a Path filter exclusion for:
/.github/CODEOWNERSNotes / gotchas
.github/CODEOWNERSCODEOWNERS(root) if applicableIf you point me at the specific AzDO pipeline YAML path(s) used by msbuild (or paste the current
trigger:/pr:sections), I can rewrite the exact snippet to match what’s already there (e.g., existing branch filters, batching, etc.).User: investigate and apply this to all pipelines in the dotnet/msbuidl repo
Assistant: I can’t apply changes yet because (1) you didn’t explicitly ask for a PR, and (2) I need the exact repo name confirmed: you wrote
dotnet/msbuidl(typo) but earlier provideddotnet/msbuild.If you want me to investigate all Azure Pipelines YAMLs in
dotnet/msbuildand then apply the.github/CODEOWNERSpath exclusion everywhere, tell me one of the following:dotnet/msbuild” (and which base branch, if not default), orOnce confirmed, I will:
azure-pipelines*.yml(and any YAML templates that definetrigger:/pr:),.github/CODEOWNERSfrom bothtriggerandpr(where present),-...
This pull request was created from Copilot chat.