Skip to content

Commit e799f86

Browse files
Merge pull request #55 from devops-infra/feature/body-newline
Added newline between commit subject and body in commit list
2 parents 9bdc70f + b95393c commit e799f86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

entrypoint.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ fi
7474

7575
echo -e "\nListing new commits in the source branch..."
7676
git log --graph --pretty=format:'%Cred%h%Creset - %Cblue%an%Creset - %Cgreen%cd%Creset %n%s %b' --abbrev-commit --date=format:'%Y-%m-%d %H:%M:%S' "origin/${TARGET_BRANCH}...origin/${SOURCE_BRANCH}"
77-
GIT_LOG=$(git log --graph --pretty=format:'%Cred%h%Creset - %Cblue%an%Creset - %Cgreen%cd%Creset %n%s %b' --abbrev-commit --date=format:'%Y-%m-%d %H:%M:%S' --no-color "origin/${TARGET_BRANCH}...origin/${SOURCE_BRANCH}")
77+
GIT_LOG=$(git log --graph --pretty=format:'%Cred%h%Creset - %Cblue%an%Creset - %Cgreen%cd%Creset %n%s%n%b' --abbrev-commit --date=format:'%Y-%m-%d %H:%M:%S' --no-color "origin/${TARGET_BRANCH}...origin/${SOURCE_BRANCH}")
7878
GIT_LOG=$(echo -e "${GIT_LOG}" | sed 's|#|^HaSz^|g' | sed ':a;N;$!ba; s/\n/^NowALiNiA^/g')
7979

8080
echo -e "\n\nListing commits subjects in the source branch..."
@@ -114,7 +114,7 @@ fi
114114
if [[ "${INPUT_GET_DIFF}" == "true" ]]; then
115115
echo -e "\nReplacing predefined fields with git information..."
116116
# little hack to trick sed to work with multiline
117-
# also backwards compatible wtih old replacement strings
117+
# also backwards compatible with old replacement strings
118118
TEMPLATE=$(echo -e "${TEMPLATE}" | sed ':a;N;$!ba; s#<!-- Diff summary - START -->.*<!-- Diff summary - END -->#<!-- Diff summary - START -->\n'"${GIT_SUMMARY}"'\n<!-- Diff summary - END -->#g')
119119
TEMPLATE=$(echo -e "${TEMPLATE}" | sed ':a;N;$!ba; s#<!-- Diff commits -->#<!-- Diff commits - START -->\n'"${GIT_LOG}"'\n<!-- Diff commits - END -->#g')
120120
TEMPLATE=$(echo -e "${TEMPLATE}" | sed ':a;N;$!ba; s#<!-- Diff commits - START -->.*<!-- Diff commits - END -->#<!-- Diff commits - START -->\n'"${GIT_LOG}"'\n<!-- Diff commits - END -->#g')

0 commit comments

Comments
 (0)