Skip to content

Commit 87ef7c3

Browse files
committed
Use git log to fetch author and co-author details
1 parent a752678 commit 87ef7c3

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

util/build.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,9 @@ for path in ${BUILD_SUMMARY_DIRS}; do
9292
fi;
9393

9494
# Generate author information
95-
committers=$(git shortlog -s -n -e "${path}" | cut -f 2);
96-
co_committers=$(
97-
git log --format="%B" "${path}" |\
98-
(grep "Co-authored-by:" || test $? = 1) |\
95+
committers=$(
96+
git log --format="Author: %an <%ae>%n%B" "${path}" |\
97+
(grep "^Author:\|^Co-authored-by:" || test $? = 1) |\
9998
cut -d " " -f 2-
10099
);
101100

@@ -104,7 +103,7 @@ for path in ${BUILD_SUMMARY_DIRS}; do
104103
IFS="$(printf "\nx")";
105104
IFS="${IFS%x}";
106105
authors="";
107-
for contributor in $(printf "%s\n%s" "${committers}" "${co_committers}"); do
106+
for contributor in ${committers}; do
108107
author_name="${contributor% <*>}";
109108
# Remove `{name} <`
110109
author_email="${contributor##* <}";

0 commit comments

Comments
 (0)