Contributor agreement: Claude's commits on this repo's branches need no sign-off

Commits by noreply@anthropic.com on a branch of this repository (not a
fork's) are skipped: only those who can push here put them there, and the
owner takes them in by merging.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRPWCkk1Ro91AuzXFM
This commit is contained in:
Claude committed 2026-11-08 11:41:19 +00:00
1 parent 945525fae3
commit cabc335d5e
1 file changed
+7 -1
+7 -1
View File
@@ -2,7 +2,10 @@
# request carries a "Signed-off-by:" line with its author's email, which
# says the author agrees to it for that commit. Merge commits are
# skipped. Pull requests opened by the repository's owner or the D-Modem
# organization's members, and by bots, are not checked.
# organization's members, and by bots, are not checked. Nor are commits
# by Claude (noreply@anthropic.com) on a branch of this repository: only
# those who can push here can put them there, and the owner takes them in
# by merging (a fork's commits with that email are still checked).
#
# pull_request_target, so that the check is the base branch's copy and a
# pull request can't change it. It reads the commits through the API and
@@ -40,10 +43,13 @@ jobs:
pull_number: pr.number,
per_page: 100,
});
const sameRepo = pr.head.repo && pr.head.repo.full_name === pr.base.repo.full_name;
const exemptAuthors = ['noreply@anthropic.com'];
const missing = [];
for (const c of commits) {
if (c.parents.length > 1) continue;
const email = (c.commit.author.email || '').toLowerCase();
if (sameRepo && exemptAuthors.includes(email)) continue;
const signed = [...c.commit.message.matchAll(/^Signed-off-by:.*<([^>]+)>\s*$/gim)]
.some(m => m[1].trim().toLowerCase() === email);
if (!signed) {