Skip to content

Disable OneLocBuild PRs against non-main branches#13690

Merged
JanProvaznik merged 3 commits into
mainfrom
copilot/disable-loc-prs-non-main-branches
May 14, 2026
Merged

Disable OneLocBuild PRs against non-main branches#13690
JanProvaznik merged 3 commits into
mainfrom
copilot/disable-loc-prs-non-main-branches

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 5, 2026

The OneLocBuild pipeline was opening localization PRs against both main and active vs* release branches. Loc PRs should only target main.

Context

.vsts-dotnet.yml has two OneLocBuild jobs in the localization stage — one for vs* release branches (gated by EnableReleaseOneLocBuild) and one for main. The release-branch job was enabled, causing unwanted loc PRs against servicing branches.

Changes Made

  • EnableReleaseOneLocBuild now defaults to false and is conditionally overridden to true only when on the main branch, following the same conditional variable pattern used elsewhere in the file.

This variable is evaluated at template compilation time (condition: ${{ variables.EnableReleaseOneLocBuild }}), so on vs* branches the variable resolves to false and the release-branch OneLocBuild job is suppressed entirely. The main branch job is unaffected.

Testing

CI pipeline configuration change only — no code changes.

Notes

The EnableReleaseOneLocBuild toggle already existed for this purpose; this PR makes its value branch-conditional rather than a static override.

Copilot AI linked an issue May 5, 2026 that may be closed by this pull request
@dotnet-policy-service
Copy link
Copy Markdown
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.

Copilot AI changed the title [WIP] Update OneLocBuild to disable localization PRs against non-main branches Disable OneLocBuild PRs against non-main branches May 5, 2026
Copilot finished work on behalf of OvesN May 5, 2026 15:35
Copilot AI requested a review from OvesN May 5, 2026 15:35
@JanProvaznik
Copy link
Copy Markdown
Member

@copilot variable should have value based on if we're on the main branch

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@copilot variable should have value based on if we're on the main branch

Updated in 77d7347EnableReleaseOneLocBuild now defaults to false and is conditionally overridden to true only on main, following the same pattern used for SourceBranch in the file.

Copilot AI requested a review from JanProvaznik May 14, 2026 11:22
@JanProvaznik JanProvaznik marked this pull request as ready for review May 14, 2026 11:27
@JanProvaznik JanProvaznik requested a review from a team as a code owner May 14, 2026 11:27
Copilot AI review requested due to automatic review settings May 14, 2026 11:27
@JanProvaznik
Copy link
Copy Markdown
Member

@OvesN ptal and merge

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Disables OneLocBuild loc PRs against vs* release branches by defaulting EnableReleaseOneLocBuild to false, only overriding to true on main (where the release-branch job isn't instantiated anyway, so the override is effectively a no-op but follows the existing conditional-variable pattern used elsewhere in the file).

Changes:

  • Default EnableReleaseOneLocBuild to false so the vs*-gated OneLocBuild job's condition evaluates false on release branches.
  • Add a ${{ if eq(Build.SourceBranch, 'refs/heads/main') }} block overriding it to true (matches surrounding style; has no functional effect since the release-branch loc job is itself gated on refs/heads/vs).

@JanProvaznik JanProvaznik merged commit 2aa10e5 into main May 14, 2026
14 checks passed
@JanProvaznik JanProvaznik deleted the copilot/disable-loc-prs-non-main-branches branch May 14, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable OneLocBuild PRs against non-main branches

5 participants