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
Noticed in passing as a result of a now defunct CL 1200735, that this CL
will supersede.
Includes improvements based on CI setup in cue-lang/vscode-cue, where
the presence of cue in PATH is assumed. The setup-cue action is used
with a "latest" version.
This change moves this repo to be based on the CUE Central Registry for
the curated GitHub actions schema.
Signed-off-by: Paul Jolly <[email protected]>
Change-Id: I10447b2d13dfdbd1fe067a5462fe59e15b1fae8b
Reviewed-on: https://review.gerrithub.io/c/cue-lang/proposal/+/1204957
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Daniel Martí <[email protected]>
# Ensure that commit messages have a blank second line.
94
-
# We know that a commit message must be longer than a single
95
-
# line because each commit must be signed-off.
96
-
if git log --format=%B -n 1 HEAD | sed -n '2{/^$/{q1}}'; then
97
-
echo "second line of commit message must be blank"
98
-
exit 1
99
-
fi
100
-
101
-
# All authors, including co-authors, must have a signed-off trailer by email.
102
-
# Note that trailers are in the form "Name <email>", so grab the email with sed.
103
-
# For now, we require the sorted lists of author and signer emails to match.
104
-
# Note that this also fails if a commit isn't signed-off at all.
105
-
#
106
-
# In Gerrit we already enable a form of this via https://gerrit-review.googlesource.com/Documentation/project-configuration.html#require-signed-off-by,
107
-
# but it does not support co-authors nor can it be used when testing GitHub PRs.
108
-
commit_authors="$(
109
-
{
110
-
git log -1 --pretty='%ae'
111
-
git log -1 --pretty='%(trailers:key=Co-authored-by,valueonly)' | sed -ne 's/.* <\(.*\)>/\1/p'
112
-
} | sort -u
113
-
)"
114
-
commit_signers="$(
115
-
{
116
-
git log -1 --pretty='%(trailers:key=Signed-off-by,valueonly)' | sed -ne 's/.* <\(.*\)>/\1/p'
117
-
} | sort -u
118
-
)"
119
-
if [[ "${commit_authors}" != "${commit_signers}" ]]; then
120
-
echo "Error: commit author email addresses do not match signed-off-by trailers"
0 commit comments