Skip to content

Commit cf59c23

Browse files
authored
Merge pull request #2737 from microsoft/ci/additional-pr-create-fixes
ci: fixes branch creation when a PR does not already exist
2 parents 6591a7b + 99fdcf8 commit cf59c23

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

.github/workflows/promote-shipped-apis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
9696
$branch = "${{ github.ref_name }}"
9797
$prBranch = "promote-shipped-apis-$branch"
98-
git push origin $prBranch
98+
git push -u origin HEAD:$prBranch
9999
100100
- name: Create new PR
101101
if: steps.check_pr.outputs.pr_exists == 'false' && steps.check_changes.outputs.has_changes == 'true'
@@ -107,8 +107,5 @@ jobs:
107107
$prBranch = "promote-shipped-apis-$branch"
108108
$title = "automatic promotion of shipped APIs for $branch"
109109
110-
git checkout -b $prBranch
111-
git push origin $prBranch
112-
113110
gh pr create --title "$title" --base "$branch" --head "$prBranch" --body "Automatically promotes unshipped APIs to shipped after running the promotion script."
114111

0 commit comments

Comments
 (0)