Skip to content

fix(LINCHPIN-5636): Rename readme.txt with the rest of a scaffolded plugin - #96

Open
aaronware wants to merge 1 commit into
mainfrom
issue/LINCHPIN-5636-scaffold-readme
Open

aaronware wants to merge 1 commit into
mainfrom
issue/LINCHPIN-5636-scaffold-readme

Conversation

@aaronware

Copy link
Copy Markdown
Contributor

Why

linchpin/plugin-scaffold#7 gives every channel a readme.txt so a generated plugin's first release passes Plugin Check. The wporg overlay already shipped one.

linchpin plugin scaffold renamed the plugin header and README.md, but not readme.txt. A generated readme kept === Plugin Scaffold === and the scaffold's description. Under --php, its Requires PHP also disagreed with the header, which Plugin Check fails as readme_mismatched_header_requires_php.

What changed

applyDisplayIdentity now rewrites readme.txt, when one exists:

  • the === Name === line, from --name
  • the short description, from --description. It's replaced only when one exists, never the == Description == heading that can follow the header block.
  • Requires PHP, from --php, when the readme declares one (the wporg overlay does; the private readme doesn't)

Verified

  • npm run typecheck, and npm test with 159 passing. Tests now cover the private readme being renamed with no Stable tag; wporg keeping its Stable tag and following --php 8.4; and self-hosted keeping the private readme.
  • End to end: I generated plugins from linchpin/plugin-scaffold#7 in all three channels. Each readme carries the plugin's name and description, and there is no leftover identity.

Follow-up

Once plugin-scaffold#7 ships in a release, bump src/core/plugin-scaffold-pin.json. It still pins v0.1.0.

…lugin

linchpin/plugin-scaffold now ships a readme.txt on every channel, and the wporg
overlay already did. The scaffold renamed the plugin header and README.md but
not readme.txt, so a generated readme kept "Plugin Scaffold" and the
scaffold's description, and under --php its Requires PHP disagreed with the
header, which Plugin Check fails.

readme.txt now takes --name, --description and, where it declares one,
--php. The short description is replaced only when one exists, rather than
the section heading that follows the header block.
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.

1 participant