From 554bc4360e2f0b7fe63cd539f0c8e73b86e9c752 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 8 Nov 2026 11:42:20 +0000 Subject: [PATCH] Contributor agreement check: Claude's commits on this repository's branches are exempt As bbs: commits by Claude (noreply@anthropic.com) on a branch of the repository itself are not checked; on a fork's pull request they still are. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01B82eRSQaj3bYPQDZU4qf9U --- .github/workflows/contributor-agreement.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/contributor-agreement.yml b/.github/workflows/contributor-agreement.yml index d86d8d0..d4d6479 100644 --- a/.github/workflows/contributor-agreement.yml +++ b/.github/workflows/contributor-agreement.yml @@ -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) {