You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Ensure that commit messages have a blank second line.
72
-
# We know that a commit message must be longer than a single
73
-
# line because each commit must be signed-off.
74
-
if git log --format=%B -n 1 HEAD | sed -n '2{/^$/{q1}}'; then
75
-
echo "second line of commit message must be blank"
76
-
exit 1
77
-
fi
76
+
go env -w GOTOOLCHAIN=local
78
77
79
-
# All authors, including co-authors, must have a signed-off trailer by email.
80
-
# Note that trailers are in the form "Name <email>", so grab the email with sed.
81
-
# For now, we require the sorted lists of author and signer emails to match.
82
-
# Note that this also fails if a commit isn't signed-off at all.
83
-
#
84
-
# In Gerrit we already enable a form of this via https://gerrit-review.googlesource.com/Documentation/project-configuration.html#require-signed-off-by,
85
-
# but it does not support co-authors nor can it be used when testing GitHub PRs.
86
-
commit_authors="$(
87
-
{
88
-
git log -1 --pretty='%ae'
89
-
git log -1 --pretty='%(trailers:key=Co-authored-by,valueonly)' | sed -ne 's/.* <\(.*\)>/\1/p'
90
-
} | sort -u
91
-
)"
92
-
commit_signers="$(
93
-
{
94
-
git log -1 --pretty='%(trailers:key=Signed-off-by,valueonly)' | sed -ne 's/.* <\(.*\)>/\1/p'
95
-
} | sort -u
96
-
)"
97
-
if [[ "${commit_authors}" != "${commit_signers}" ]]; then
98
-
echo "Error: commit author email addresses do not match signed-off-by trailers"
0 commit comments