From 5c24d362948385039969e88527660d1ec590a0ed Mon Sep 17 00:00:00 2001 From: Yabo Hu Date: Fri, 19 Jul 2024 08:33:23 +0800 Subject: [PATCH] [eng] Fix typo for sync main github action and skip PR creation (#25582) * fix typo * fix typo * temporary test * temporary test * temporary test * temporary test * temporary test * finalize: create branch with commit without PR --- .github/workflows/sync-main-to-future.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/sync-main-to-future.yml b/.github/workflows/sync-main-to-future.yml index 7ef6eba531f6..0b5570fd464a 100644 --- a/.github/workflows/sync-main-to-future.yml +++ b/.github/workflows/sync-main-to-future.yml @@ -11,6 +11,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + pull-requests: write steps: - uses: actions/checkout@v4 with: @@ -29,18 +30,19 @@ jobs: } } $commitId = '${{ github.event.head_commit.id }}' - $commitIdShort = $commitId.Subsctring(0,5) + $commitIdShort = $commitId.Substring(0,5) git config user.email "65331932+azure-powershell-bot@users.noreply.github.com"; git config user.name "azure-powershell-bot"; - $branchName = "eng/sync-main-to-future-$commitIdShort" + $branchName = "temporary/sync-main-to-future-$commitIdShort" git checkout -b $branchName - $prInfo = "Sync commit [$commitMessage ($commitId)] from main branch to future branch .." - Write-Host -ForegroundColor DarkGreen $prInfo - git fetch origin main git cherry-pick $commitId --strategy-option theirs - git push origin head - gh pr create -B $branchName -H future --title $commitMessage --body $prInfo \ No newline at end of file + git push origin $branchName + + # commented because extra configuration needed to allow github action to create PR + # $prInfo = "Sync commit [$commitMessage ($commitId)] from main branch to future branch ..." + # Write-Host -ForegroundColor DarkGreen $prInfo + # gh pr create -B $branchName -H future --title $commitMessage --body $prInfo \ No newline at end of file