Skip to content

Fix the self-healing PR descriptions and avoids em dashes at creation - #3444

Merged
pwizla merged 5 commits into
mainfrom
repo/self-healing-pr-descriptions-em-dash
Sep 4, 2026
Merged

Fix the self-healing PR descriptions and avoids em dashes at creation#3444
pwizla merged 5 commits into
mainfrom
repo/self-healing-pr-descriptions-em-dash

Conversation

@pwizla

@pwizla pwizla commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

This PR fixes the self-healing workflow so its PRs stop arriving in a state that needs hand-cleaning at review time, after #3443 came in with a canned description and an em dash.

  • Both prompts now build the PR description from the actual diff, following pr-description-rules.md, instead of pasting a fixed body that named no change, carried the source PR as a bare URL, and repeated boilerplate the label, assignee and draft status already convey
  • Both prompts run style-lint.sh before committing and fix what it reports, but it never stops a PR from being opened: a leftover em dash costs seconds at review, an abandoned PR costs the whole page and is silently lost since the next run only lists PRs merged in the last 24 hours
  • The Drafter prompt gets an em dash sweep at output time, because it already forbade em dashes 300 lines earlier and Document release actions in audit logs #3443 carried one anyway, and the micro-edit path gets the rule stated for the first time, since it loads router.md only and router.md never mentioned it
  • Adds check-no-em-dash.sh to the auto-merge eligibility criteria, as a pure test that reports and never edits the PR, so nothing merges automatically with an em dash in it
  • Repairs two latent bugs in the same blocks: the Router git reset that ran after the file edits and would destroy them, and the broken line continuations in the Drafter gh pr create call that would drop the body, labels and draft flag

Em dashes are not used in Strapi documentation and are a strong tell of unedited AI-generated prose. The self-healing workflow now lints them out before committing, and this check is the net under that: it reports, it never edits the PR.
The Style Checker prompt already forbids em dashes, but a prompt is a probabilistic filter and style-lint.sh is not: an em dash still reached PR #3443. Micro-edits skip the Style Checker entirely, so the script is their only style guard. The Router block is reordered first, since its git reset ran after the file edits and would have destroyed them.
The canned body named no change, put the source PR as a bare URL instead of a Documents link, carried no preview link, and repeated boilerplate the label, assignee and draft status already convey. Both prompts now build the description from the actual diff. Also repairs the broken line continuations in the Drafter gh pr create call, which would have dropped the body, labels and draft flag.
@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
documentation Ready Ready Preview Sep 4, 2026 9:12am UTC

Request Review

@github-actions github-actions Bot added internal PRs created by the Strapi core team pr: chore source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo labels Sep 4, 2026
…ning a PR

A remaining em dash costs a few seconds of editing at review time. An abandoned PR costs re-reading the strapi/strapi diff and writing the page by hand, and the source PR does not come back: the next run only lists PRs merged in the last 24 hours, so anything skipped is silently lost.
The Drafter prompt already forbade em dashes and PR #3443 carried one anyway: the rule sits 300 lines before the first sentence is written, so it now runs again as a sweep at output time. Micro-edits had no rule at all, since that path loads router.md only and router.md never mentioned em dashes.
@pwizla pwizla changed the title Fix the self-healing PR descriptions and block em dashes at creation Fix the self-healing PR descriptions and avoids em dashes at creation Sep 4, 2026

@pwizla pwizla left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, let's merge and test in prod 🚀

@pwizla
pwizla merged commit cb8e2c0 into main Sep 4, 2026
5 checks passed
@pwizla
pwizla deleted the repo/self-healing-pr-descriptions-em-dash branch September 4, 2026 09:23
@pwizla pwizla added this to the 7.1.2 milestone Sep 4, 2026
@pwizla pwizla self-assigned this Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal PRs created by the Strapi core team pr: chore source: repo PRs/issues not targeting a specific documentation but rather affecting the whole repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant