Skip to content

Commit

Permalink
[Localization] Create a new branch for the automated PRs (#18881)
Browse files Browse the repository at this point in the history
In my Localization inspection, I wanted to figure out why the automated
PRs I was creating in Pipelines were auto-closing themselves a few hours
after creating them -
[example](#18713).

There are a few different steps in the localization process and long
story short is that I am creating these PRs from the Localization
branch. Each commit into main runs a tool that alerts the Loc team and
it syncs up our Localization branch to our main branch which temporarily
deletes our Localization branch thus closing the automated PR!

This PR creates a new unique branch for each Localization PR so that we
can keep updating the Loc team, but also make sure syncing the
Localization branch will not delete this PR.

Testing this created this PR below:
#18880
  • Loading branch information
tj-devel709 committed Sep 1, 2023
1 parent 8e0609a commit cd69385
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tools/devops/automation/build-lego.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ trigger:
stages:

- ${{ if eq(parameters.runGovernanceTests, true) }}:
- stage: governance_checks
- stage: LocalizationChanges
displayName: 'Governance Checks'
jobs:
- job: governance
Expand Down Expand Up @@ -84,11 +84,18 @@ stages:
git fetch origin
# create a new branch from the Localization branch for our PR in case the Localization branch gets overwritten
git checkout Localization
git checkout -b Localization-Automated-$(Build.BuildNumber)
git push origin Localization-Automated-$(Build.BuildNumber)
git checkout main
gh pr create `
--title "Bring changes from Localization branch #$(Build.BuildNumber)" `
--body "The OneLoc team creates these translations to be consumed later on in the second step of the Localization process. We need to bring these into the main branch in order to continue the process." `
--base main `
--head Localization `
--head Localization-Automated-$(Build.BuildNumber) `
--label not-notes-worthy `
--milestone Future `
--draft=false
Expand Down

6 comments on commit cd69385

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.