Skip to content

[devops] Remove the branch-based trigger for pull requests. - #25182

Merged
rolfbjarne merged 1 commit into
mainfrom
dev/rolf/devops-only-pr-triggers-for-prs
Apr 20, 2026
Merged

rolfbjarne merged 1 commit into
mainfrom
dev/rolf/devops-only-pr-triggers-for-prs

Conversation

@rolfbjarne

@rolfbjarne rolfbjarne commented Apr 17, 2026 •

Copy link
Copy Markdown
Member

The pull request #25177 ran the PR pipeline twice:

when it should only have been done once.

So I asked Copilot, which said:

It was triggered twice because two different Azure triggers fired for the same change.

 - 13868591 was queued as individualCI for refs/heads/dev/rolf/nsurlsession-cleanup on commit b3223c4.
 - 13868592 was queued seconds later as pullRequest for refs/pull/25177/merge on the synthetic merge commit 7fccb8c.

That matches the repo’s PR pipeline config in tools/devops/automation/build-pull-request.yml, which has both a branch trigger: for refs/heads/dev/* and a pr: trigger for '*'. So opening/updating PR #25177 caused one normal branch CI run and one PR-validation run.

So disable the branched-based trigger.

The pull request #25177 ran the PR pipeline twice:

* https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=13868591&view=results
* https://dev.azure.com/devdiv/DevDiv/_build/results?buildId=13868592&view=results

when there should be only one.

So I asked Copilot, which said:

    It was triggered twice because two different Azure triggers fired for the same change.

     - 13868591 was queued as individualCI for refs/heads/dev/rolf/nsurlsession-cleanup on commit b3223c4.
     - 13868592 was queued seconds later as pullRequest for refs/pull/25177/merge on the synthetic merge commit 7fccb8c.

    That matches the repo’s PR pipeline config in tools/devops/automation/build-pull-request.yml, which has both a branch trigger: for refs/heads/dev/* and a pr: trigger for '*'. So opening/updating PR #25177 caused one normal branch CI run and one PR-validation run.

So disable the branched-based trigger.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Azure DevOps PR validation pipeline configuration to avoid double-queuing builds by removing the branch-based CI trigger from the PR pipeline YAML.

Changes:

  • Removed the trigger: (branch push) configuration from build-pull-request.yml so only the pr: trigger remains.
Comments suppressed due to low confidence (1)

tools/devops/automation/build-pull-request.yml:55

  • After removing the trigger: block entirely, Azure Pipelines may fall back to its default CI trigger behavior (potentially enabling push builds again) depending on pipeline settings. If the intent is to disable all branch/push-triggered runs and keep this pipeline PR-only, add an explicit trigger: none at the top level (consistent with other pipelines in this repo like publish-pr-html-results.yml and run-pr-api-diff.yml).
variables:
- template: templates/variables/common.yml
- template: templates/variables/api-scan.yml
- name: Packaging.EnableSBOMSigning
  value: false

pr:
  autoCancel: true
  branches:
    include:
    - '*'  # yes, you do need the quote, * has meaning in yamls

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [CI Build #9406530] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 94065301bffaf4e780c825e8ca435487bcc4bf8c [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #9406530] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 94065301bffaf4e780c825e8ca435487bcc4bf8c [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 94065301bffaf4e780c825e8ca435487bcc4bf8c [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [CI Build #9406530] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 94065301bffaf4e780c825e8ca435487bcc4bf8c [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [CI Build #9406530] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 156 tests passed 🎉

Tests counts

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. [attempt 3] Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 6 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 11 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

✅ Linux build succeeded

Pipeline on Agent
Hash: 94065301bffaf4e780c825e8ca435487bcc4bf8c [PR build]

@rolfbjarne
rolfbjarne disabled auto-merge April 20, 2026 15:17
@rolfbjarne
rolfbjarne merged commit 31655be into main Apr 20, 2026
52 checks passed
rolfbjarne added a commit that referenced this pull request May 6, 2026
…25344)

* [devops] Make the tests pipeline use a pr: trigger. (#25239)
* [devops] Make the API diff pipeline use a pr: trigger. (#25284)
* [devops] Fix PR latest-commit detection (#25231)
* [devops] Add a timeout to the 'Publish to Artifact Services Drop' step. (#25210)
* [devops] Disable implicit CI triggers on xamarin-macios-pr pipeline (#25211)
* [devops] Remove the branch-based trigger for pull requests. (#25182)

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rokvin@microsoft.com>
rolfbjarne added a commit that referenced this pull request May 7, 2026
…25345)

* [devops] Make the tests pipeline use a pr: trigger. (#25239)
* [devops] Make the API diff pipeline use a pr: trigger. (#25284)
* [devops] Fix PR latest-commit detection (#25231)
* [devops] Disable implicit CI triggers on xamarin-macios-pr pipeline (#25211)
* [devops] Remove the branch-based trigger for pull requests. (#25182)

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rokvin@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants