Skip to content

Commit fc846bb

Browse files
refactor: Get current Git branch more simply
Use the new --show-current arg to branch in place of git rev-parse.
1 parent ff50007 commit fc846bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if [ "$INPUT_COMMIT" == 'false' ]; then INPUT_COMMIT='--files-only'; else INPUT_
77
if [ "$INPUT_COMMITIZEN_VERSION" == 'latest' ]; then INPUT_COMMITIZEN_VERSION="commitizen"; else INPUT_COMMITIZEN_VERSION="commitizen==$INPUT_COMMITIZEN_VERSION"; fi
88
if [ -n "$INPUT_NO_RAISE" ]; then INPUT_NO_RAISE="--no-raise $INPUT_NO_RAISE"; else INPUT_NO_RAISE=''; fi
99

10-
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
10+
CURRENT_BRANCH="$(git branch --show-current)"
1111
INPUT_BRANCH=${INPUT_BRANCH:-$CURRENT_BRANCH}
1212
INPUT_EXTRA_REQUIREMENTS=${INPUT_EXTRA_REQUIREMENTS:-''}
1313
REPOSITORY=${INPUT_REPOSITORY:-$GITHUB_REPOSITORY}

0 commit comments

Comments
 (0)