From 7c7bf6735f6ec8fd468852fe0dc66b9dc005c4fe Mon Sep 17 00:00:00 2001 From: TJ Lambert <50846373+tj-devel709@users.noreply.github.com> Date: Thu, 28 Nov 2024 02:42:08 -0600 Subject: [PATCH] Change Yaml to use OneLocTool to create PR after we receive the lcl files (#26177) * Change the yaml to allow the OneLocTool to create PRs using lcl files * also remove from handlers --- .../common/localization-handback.yml | 34 +++++++++++++++++++ eng/pipelines/common/variables.yml | 2 +- eng/pipelines/handlers.yml | 1 + 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 eng/pipelines/common/localization-handback.yml diff --git a/eng/pipelines/common/localization-handback.yml b/eng/pipelines/common/localization-handback.yml new file mode 100644 index 000000000000..9ea10afcd316 --- /dev/null +++ b/eng/pipelines/common/localization-handback.yml @@ -0,0 +1,34 @@ +parameters: + CeapexPat: $(dn-bot-ceapex-package-r) # PAT for the loc AzDO instance https://dev.azure.com/ceapex + GithubPat: $(BotAccount-dotnet-bot-repo-PAT) + +stages: + - stage: localization_handback + displayName: Localization Handback + dependsOn: [] + condition: eq(variables.isLocBranch, true) + + jobs: + - job : generate_resx + displayName: 'Process incoming translations' + pool: $(HostedWinVS2019) + + variables: + - group: OneLocBuildVariables # Contains the CeapexPat and GithubPat + + steps: + - task: OneLocBuild@2 + displayName: 'Localization Build' + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + inputs: + locProj: 'eng/automation/LocProject.json' + outDir: '$(Build.ArtifactStagingDirectory)' + packageSourceAuth: patAuth + patVariable: ${{ parameters.CeapexPat }} + isCreatePrSelected: true + isAutoCompletePrSelected: false + repoType: gitHub + prSourceBranchPrefix: $(LocBranchPrefix) + gitHubPatVariable: "${{ parameters.GithubPat }}" + gitHubPrMergeMethod: merge diff --git a/eng/pipelines/common/variables.yml b/eng/pipelines/common/variables.yml index 901efbd7319d..d17aaa25e4c6 100644 --- a/eng/pipelines/common/variables.yml +++ b/eng/pipelines/common/variables.yml @@ -18,7 +18,7 @@ variables: - name: isMainBranch value: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')] - name: isLocBranch - value: $[or(eq(variables['Build.SourceBranch'], 'refs/heads/loc'), startsWith(variables['Build.SourceBranch'], 'refs/heads/loc-'))] + value: $[or(eq(variables['Build.SourceBranch'], 'refs/heads/lego'), startsWith(variables['Build.SourceBranch'], 'refs/heads/lego'))] - name: isTargetMainBranch value: $[eq(variables['System.PullRequest.TargetBranch'], 'refs/heads/main')] - name: isLocPRBranch diff --git a/eng/pipelines/handlers.yml b/eng/pipelines/handlers.yml index 1ac742ae881b..1db0db8dde77 100644 --- a/eng/pipelines/handlers.yml +++ b/eng/pipelines/handlers.yml @@ -354,3 +354,4 @@ stages: - ${{ if eq(variables['System.TeamProject'], 'devdiv') }}: - template: common/localization-handoff.yml # Process outgoing strings [Localization Handoff] + - template: common/localization-handback.yml # Process incoming translations and Create PR to main [Localization Handback]