File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99jobs :
1010 prep-changes :
1111 runs-on : ubuntu-latest
12- if : github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
12+ if : github.event.workflow_run.event == 'pull_request'
1313 steps :
1414 - uses : actions/checkout@v6
1515
3636
3737 # Get the source branch name and target branch
3838 SOURCE_BRANCH="${{ github.head_ref }}"
39+ SOURCE_SHA="${{ github.event.pull_request.head.sha }"
3940 TARGET_BRANCH="${{ steps.target-branch.outputs.branch }}"
4041 SYNC_BRANCH="sync-${SOURCE_BRANCH}-to-${TARGET_BRANCH}"
4142
5556 git checkout -b $SYNC_BRANCH origin/$TARGET_BRANCH
5657
5758 # Get all commits from the PR
58- COMMITS=$(git log --reverse --format="%H" origin/$TARGET_BRANCH..origin/$SOURCE_BRANCH )
59+ COMMITS=$(git log --reverse --format="%H" origin/$TARGET_BRANCH..$SOURCE_SHA )
5960
6061 # Cherry-pick each commit
6162 echo "Cherry-picking commits..."
You can’t perform that action at this time.
0 commit comments