File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 17
17
defaultBranchPattern : " feature_branch/*"
18
18
defaultMainBranch : " main"
19
19
triggerTestsLabel : " tests-requested: quick"
20
+ branchPrefix : " workflow/auto-merge-feature-branch-"
21
+
20
22
21
23
jobs :
22
24
list_feature_branches :
85
87
python scripts/gha/install_prereqs_desktop.py
86
88
python -m pip install requests
87
89
90
+ - name : Name new branch
91
+ run : |
92
+ date_str=$(date "+%Y%m%d-%H%M%S")
93
+ echo "NEW_BRANCH=${{env.branchPrefix}}${{github.run_number}}-${date_str}" >> $GITHUB_ENV
94
+
88
95
- name : Create merge PR
89
96
id : create-pr
90
97
run : |
@@ -115,7 +122,10 @@ jobs:
115
122
116
123
> Created on ${date_str} by [${{github.workflow}} workflow]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID).
117
124
"
118
- pr_number=$(python scripts/gha/create_pull_request.py --token ${{ steps.generate-token.outputs.token }} --base "${{ matrix.branch_name }}" --head "${main_branch}" --title "${pr_title}" --body "${pr_body}")
125
+ git checkout main
126
+ git checkout -b "${NEW_BRANCH}"
127
+ git push --set-upstream origin "${NEW_BRANCH}"
128
+ pr_number=$(python scripts/gha/create_pull_request.py --token ${{ steps.generate-token.outputs.token }} --base "${{ matrix.branch_name }}" --head "${NEW_BRANCH}" --title "${pr_title}" --body "${pr_body}")
119
129
echo "created_pr_number=${pr_number}" >> $GITHUB_OUTPUT
120
130
121
131
- name : Set test trigger label.
You can’t perform that action at this time.
0 commit comments