Skip to content

Commit 7b96497

Browse files
author
Anton Benkevich
committed
Fix automerge
1 parent 05a738d commit 7b96497

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/automerge.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
: "${BRANCHES_TO_MERGE_REGEX?}" "${BRANCH_TO_MERGE_INTO?}"
77
: "${GITHUB_TOKEN?}" "${GITHUB_REPO?}"
88

9+
BRANCH_NAME=$(awk -F'/' '{print $3}' "${GITHUB_HEAD_REF}")
10+
export BRANCH_NAME
11+
912
git config --global user.email "[email protected]"
1013
git config --global user.name "CI bot"
1114

@@ -47,4 +50,4 @@ push_uri="https://[email protected]/$GITHUB_REPO"
4750
#git push "$push_uri" "$BRANCH_TO_MERGE_INTO" >/dev/null 2>&1
4851
git push "$push_uri" "$BRANCH_TO_MERGE_INTO"
4952
#git push "$push_uri" :"$GITHUB_HEAD_REF" >/dev/null 2>&1
50-
git push "$push_uri" :"$GITHUB_HEAD_REF"
53+
git push "$push_uri" :"$BRANCH_NAME"

0 commit comments

Comments
 (0)