File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
.github/workflows/scripts Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ on_error() {
56
56
exit " $1 "
57
57
}
58
58
59
- # Resolves a name and email using .mailmap via git check-mailmap, falling back to the provided values if no match is found.
59
+ # Resolves a name and email using .mailmap via ` git check-mailmap` , falling back to the provided values if no match is found.
60
60
#
61
61
# $1 - name
62
62
# $2 - email
@@ -85,8 +85,8 @@ resolve_user() {
85
85
name_email=$( grep -i " $github_handle " " $mailmap_file " | head -n 1)
86
86
87
87
if [ -n " $name_email " ]; then
88
- # Extract name and email from the matching line :
89
- echo " $name_email " | sed -E ' s/^(.* )<(.* )>.*$ /\1 <\2>/' | xargs
88
+ # Extract only the first name and email pair :
89
+ echo " $name_email " | sed -E ' s/^([^<]+ )<([^>]+ )>.*/\1<\2>/' | xargs
90
90
else
91
91
# If no match found, use the GitHub handle as is:
92
92
echo " $github_handle <$github_handle @users.noreply.github.com>"
You can’t perform that action at this time.
0 commit comments