Skip to content

pr-body-check crashes on a PR body with CodeRabbit's summary #1067

Closed

Description

@V3RON

What happened

.agents/scripts/merge-pr.sh 1065 stopped with TypeError: Cannot read properties of null (reading 'text') at .agents/scripts/pr-body-check.mjs:281 (checklistItems), then not merged: PR #1062 body fails pr-body-check.mjs.

Why

checklistItems pushes null for an unindented line, and the next indented line then reads checklist.at(-1).text on that null. CodeRabbit's summary, appended to the PR body, has exactly that shape: * **New Features**, then * Setup now ....

Repro

Any PR body with an unindented non-checklist line followed by an indented line, for example a CodeRabbit "Summary by CodeRabbit" block. Run node .agents/scripts/pr-body-check.mjs <pr>.

Workaround used

I removed the CodeRabbit block from #1062's body by hand and re-ran the gate.

Written by an agent.

Activity

  1. added
    bug:new
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug:new

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions