Skip to content

Commit

Permalink
[eng] Fix typo for sync main github action and skip PR creation (Azur…
Browse files Browse the repository at this point in the history
…e#25582)

* fix typo

* fix typo

* temporary test

* temporary test

* temporary test

* temporary test

* temporary test

* finalize: create branch with commit without PR
  • Loading branch information
VeryEarly authored Jul 19, 2024
1 parent b9f164a commit 5c24d36
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/sync-main-to-future.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -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 "[email protected]";
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
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

0 comments on commit 5c24d36

Please sign in to comment.