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 1717 defaultBranchPattern : " feature_branch/*" 
1818 defaultMainBranch : " main" 
1919 triggerTestsLabel : " tests-requested: quick" 
20+  branchPrefix : " workflow/auto-merge-feature-branch-" 
21+ 
2022
2123jobs :
2224 list_feature_branches :
8587 python scripts/gha/install_prereqs_desktop.py 
8688 python -m pip install requests 
8789
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+ 
8895name : Create merge PR 
8996 id : create-pr 
9097 run : | 
@@ -115,7 +122,10 @@ jobs:
115122
116123 > Created on ${date_str} by [${{github.workflow}} workflow]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID). 
117124 " 
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}") 
119129 echo "created_pr_number=${pr_number}" >> $GITHUB_OUTPUT 
120130
121131name : Set test trigger label. 
                         You can’t perform that action at this time. 
           
                  
0 commit comments