File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
.github/actions/merge-branches-verified Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ FROM_SHA=$last_cmd_stdout
5252execute_command --no-std -- git rev-parse " origin/$TO_BRANCH "
5353TO_SHA=$last_cmd_stdout
5454
55+ if [ -n " $GITHUB_OUTPUT " ]; then
56+ echo " target_before_merge_sha=$TO_SHA " >> " $GITHUB_OUTPUT "
57+ echo " source_commit_sha=$FROM_SHA " >> " $GITHUB_OUTPUT "
58+ fi
59+
5560# Check if FROM_BRANCH is already merged into TO_BRANCH
5661execute_command --ignore-exit-code 1 --no-std -- git merge-base --is-ancestor " origin/$FROM_BRANCH " " origin/$TO_BRANCH "
5762if [ $last_cmd_result -eq 0 ]; then
@@ -70,6 +75,4 @@ if [ -n "$GITHUB_OUTPUT" ]; then
7075 if echo " $merge_commit_sha " | grep -Pq ' ^[0-9a-fA-F]{40,}\s*$' ; then
7176 echo " merge_commit_sha=$merge_commit_sha " >> " $GITHUB_OUTPUT "
7277 fi
73- echo " target_before_merge_sha=$TO_SHA " >> " $GITHUB_OUTPUT "
74- echo " source_commit_sha=$FROM_SHA " >> " $GITHUB_OUTPUT "
7578fi
You can’t perform that action at this time.
0 commit comments