File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -16,17 +16,28 @@ jobs:
1616 runs-on : ubuntu-latest
1717
1818 steps :
19+ # 1) Check out the repo at the pushed ref so the action has a git repo context
20+ - name : Checkout repo@pushed ref
21+ uses : actions/checkout@v4
22+ with :
23+ # This checks out the exact branch that triggered the workflow
24+ ref : ${{ github.ref }}
25+ # pull full history so the action can create/update branches if needed
26+ fetch-depth : 0
27+
28+ # 2) Derive plain branch name from refs/heads/...
1929 - name : Derive branch name
2030 id : refs
2131 run : |
2232 BRANCH="${GITHUB_REF#refs/heads/}"
2333 echo "branch=$BRANCH" >> "$GITHUB_OUTPUT"
2434
35+ # 3) Create or update PR from that branch to main
2536 - name : Create Pull Request
2637 uses : peter-evans/create-pull-request@v6
2738 with :
28- branch : ${{ steps.refs.outputs.branch }}
29- base : main
39+ branch : ${{ steps.refs.outputs.branch }} # head branch
40+ base : main # base branch
3041 title : " Sync from ADO ${{ steps.refs.outputs.branch }}"
3142 body : |
3243 Automated sync from ADO.
You can’t perform that action at this time.
0 commit comments