Skip to content

Commit 5c24d36

Browse files
authored
[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
1 parent b9f164a commit 5c24d36

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/sync-main-to-future.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
permissions:
1313
contents: write
14+
pull-requests: write
1415
steps:
1516
- uses: actions/checkout@v4
1617
with:
@@ -29,18 +30,19 @@ jobs:
2930
}
3031
}
3132
$commitId = '${{ github.event.head_commit.id }}'
32-
$commitIdShort = $commitId.Subsctring(0,5)
33+
$commitIdShort = $commitId.Substring(0,5)
3334
3435
git config user.email "[email protected]";
3536
git config user.name "azure-powershell-bot";
3637
37-
$branchName = "eng/sync-main-to-future-$commitIdShort"
38+
$branchName = "temporary/sync-main-to-future-$commitIdShort"
3839
git checkout -b $branchName
3940
40-
$prInfo = "Sync commit [$commitMessage ($commitId)] from main branch to future branch .."
41-
Write-Host -ForegroundColor DarkGreen $prInfo
42-
4341
git fetch origin main
4442
git cherry-pick $commitId --strategy-option theirs
45-
git push origin head
46-
gh pr create -B $branchName -H future --title $commitMessage --body $prInfo
43+
git push origin $branchName
44+
45+
# commented because extra configuration needed to allow github action to create PR
46+
# $prInfo = "Sync commit [$commitMessage ($commitId)] from main branch to future branch ..."
47+
# Write-Host -ForegroundColor DarkGreen $prInfo
48+
# gh pr create -B $branchName -H future --title $commitMessage --body $prInfo

0 commit comments

Comments
 (0)