Skip to content

Commit bb4fa8e

Browse files
authored
Hotfix - Add log compare as default instead of full log (#237)
1 parent 2c9e17c commit bb4fa8e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ _NOTE: set the fetch-depth for `actions/checkout@v2` or newer to be sure you ret
8484
- **MINOR_STRING_TOKEN** _(optional)_ - Change the default `#minor` commit message string tag.
8585
- **PATCH_STRING_TOKEN** _(optional)_ - Change the default `#patch` commit message string tag.
8686
- **NONE_STRING_TOKEN** _(optional)_ - Change the default `#none` commit message string tag.
87-
- **BRANCH_HISTORY** _(optional)_ - Set the history of the branch for finding `#bumps`. Possible values `last` and `full` defaults to full history of the new branch.
87+
- **BRANCH_HISTORY** _(optional)_ - Set the history of the branch for finding `#bumps`. Possible values `last`, `full` and `compare` defaults to `compare`.
88+
- `full`: attempt to show all history, does not work on rebase and squash due missing HEAD [should be deprecated in v2 is breaking many workflows]
89+
- `last`: show the single last commit
90+
- `compare`: show all commits since previous repo tag number
8891

8992
#### Outputs
9093

entrypoint.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ major_string_token=${MAJOR_STRING_TOKEN:-#major}
1919
minor_string_token=${MINOR_STRING_TOKEN:-#minor}
2020
patch_string_token=${PATCH_STRING_TOKEN:-#patch}
2121
none_string_token=${NONE_STRING_TOKEN:-#none}
22-
branch_history=${BRANCH_HISTORY:-full}
22+
branch_history=${BRANCH_HISTORY:-compare}
2323
# since https://github.blog/2022-04-12-git-security-vulnerability-announced/ runner uses?
2424
git config --global --add safe.directory /github/workspace
2525

@@ -143,6 +143,7 @@ fi
143143
declare -A history_type=(
144144
["last"]="$(git show -s --format=%B)" \
145145
["full"]="$(git log "${default_branch}"..HEAD --format=%B)" \
146+
["compare"]="$(git log "${tag_commit}".."${commit}" --format=%B)" \
146147
)
147148
log=${history_type[${branch_history}]}
148149
printf "History:\n---\n%s\n---\n" "$log"

0 commit comments

Comments
 (0)