Skip to content

🏗️✨:check pull request titles and sign-offs - #1813

Merged
DerekNonGeneric merged 2 commits into
livefrom
feat/lint-pull-requests
Aug 13, 2026
Merged

🏗️✨:check pull request titles and sign-offs#1813
DerekNonGeneric merged 2 commits into
livefrom
feat/lint-pull-requests

Conversation

@DerekNonGeneric

Copy link
Copy Markdown
Member

Phase 2, plus the DCO check you asked me to consider. This pull request is checked by the workflow it adds — the run below is the demonstration.

The title is the landed subject, and nothing checked it

squash_merge_commit_title is PR_TITLE, so the title becomes the commit subject verbatim. verify.commits never saw it, because a title is not a commit. verify.pullRequest now holds it to the same rules through the same module, so the two cannot drift.

The description only has to exist. The template is one long HTML comment, so a pull request opened without a word written renders as nothing at all, and that is what this catches — not what the words say.

Probed with eight titles and bodies:

given result
good title, real description passes
good title, empty body rejected
good title, untouched template as the body rejected
fix the thing rejected — no emoji, no
🏗️🔧:fix the thing #1810 rejected — PR-URL: carries that
a title 51 characters long rejected
🔧:fix the thing rejected — an action where a category belongs
🏗️🔧:fix it"; touch /tmp/pwned; # passes, and no file was created

What I took from nodejs.org

Their pull-request-policy.yml checks the title only — no body check at all — so this is already stricter than their bar. Four things copied:

  • The title arrives through env:, never interpolated into run:. A title is written by whoever opened the pull request; pasting one into a shell is how a title comes to run as code. That last probe above is the test for it.
  • types: [opened, edited, synchronize, reopened, ready_for_review] — without edited, a title fixed after opening is never re-checked, which is the state lint-and-test.yml is in today.
  • permissions: contents: read, and concurrency with cancel-in-progress, since a title gets fixed two or three times in a row.
  • A separate policy workflow rather than folding it into the test run.

No install step. The task imports one module from this package and nothing from node_modules, and node resolves a self-reference on its own — verified in a worktree with no node_modules present. So the job is a checkout and a node invocation.

The DCO: you already had one, and I had stopped

Going looking, as you suggested: 1055 commits in this repository carry Signed-off-by, including 19 of the 40 immediately before this session. All nine I landed today carry none. I dropped a long-standing convention without noticing, and that is the real answer to whether a DCO check is worth having.

Two other things the history shows, both of which the check now stops:

  • Twenty distinct sign-off identities, five of them spellings of you, and one — Signed-off-by: @OpenINFbot — that is not an identity at all.
  • Bots have been signing off: dependabot, renovate and OpenINF Bot all appear. That contradicts what this handbook now says, and it is the thing worth stopping: a bot cannot certify that a human has the right to submit a change.

So verify.commits now requires each non-bot commit to carry a Signed-off-by: naming its own author, which catches both. Five cases probed: missing, matching, signed by a bot, the @OpenINFbot form, and the author plus a co-signer — only the last two of those pass, correctly.

nodejs/node itself enforces nothing here; the DCO is asserted by opening a pull request against a template that contains the certificate. This is stricter, which I think is right for a repository where most commits are written with a tool: Assisted-by: names the tool, Signed-off-by: names the person answerable for it.

One artifact worth knowing about

The sign-off names the branch commit's author, Derek Lewis <DerekNonGeneric@inf.is>, which is your local git identity. GitHub rewrites the author when it squashes, to the address on your account — dereknongeneric@open.inf.is — so a landed commit's author and its sign-off will not be identical strings.

verify.commits only ever reads a branch, so it never sees this and never fails on it. Aligning the two would mean changing user.email, and I have not touched it: gpg.format is ssh and ~/.ssh/allowed_signers binds your key to DerekNonGeneric@inf.is, so changing the address would break local signature verification. Adding the second address to that file, or to your GitHub account, is the tidier fix if you want them to match.

Verification

  • nps test — 16/16 tasks, 45/45 tests
  • verify.pullRequest sits outside build/tasks/verify/ on purpose: verify.all globs that directory, and a task that needs a pull request in its environment would either fail locally or have to pass silently. Confirmed it is not picked up.
  • Both commits here carry a sign-off and pass the check they add. The second was rejected once for a 73-character line, and amended.

The title becomes the subject of the commit that lands, because the
squash takes it verbatim, and until now nothing checked it until the
commits already existed. It answers to the same rules as a subject now,
through the same module, so the two cannot drift.

The description has to say something. The template is one long HTML
comment, so a pull request opened without a word written renders as
nothing at all; that is what this looks for, not what the words say.

Both arrive through the environment rather than the command line, which
is how nodejs.org does it and for the reason they do it: a title is
written by whoever opened the pull request, and one pasted into a shell
can run as code. Bots are left to their own formats, as with commits.

Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is>
Assisted-by: Claude-Code:claude-opus-5
@netlify

netlify Bot commented Aug 13, 2026

Copy link
Copy Markdown

Deploy Preview for gh-pages-openinf ready!

Name Link
🔨 Latest commit a92a126
🔍 Latest deploy log https://app.netlify.com/projects/gh-pages-openinf/deploys/6a7daea167b7ee000844414f
😎 Deploy Preview https://deploy-preview-1813--gh-pages-openinf.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

// The template is one long HTML comment, so a pull request opened without a
// word written renders as nothing at all. That is what this looks for --
// not what the description says, only that there is one.
if (body.replaceAll(/<!--[\s\S]*?-->/g, '').trim() === '') {
This repository has been signing off for a long time -- 1055 commits
carry the trailer, and 19 of the 40 before this session. The handbook
described it as one trailer among several without ever saying it was
expected. It says so now, and says why the name has to be the author's:
a tool cannot certify the DCO for you, and neither can a bot.

Signed-off-by: Derek Lewis <DerekNonGeneric@inf.is>
Assisted-by: Claude-Code:claude-opus-5
@DerekNonGeneric
DerekNonGeneric force-pushed the feat/lint-pull-requests branch from fff1b74 to a92a126 Compare August 13, 2026 11:46
@DerekNonGeneric
DerekNonGeneric merged commit f03f05b into live Aug 13, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants