Repository navigation
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
linchpin/plugin-scaffold#7 gives every channel a
readme.txtso a generated plugin's first release passes Plugin Check. The wporg overlay already shipped one.linchpin plugin scaffoldrenamed the plugin header andREADME.md, but notreadme.txt. A generated readme kept=== Plugin Scaffold ===and the scaffold's description. Under--php, itsRequires PHPalso disagreed with the header, which Plugin Check fails asreadme_mismatched_header_requires_php.What changed
applyDisplayIdentitynow rewritesreadme.txt, when one exists:=== Name ===line, from--name--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, andnpm testwith 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.Follow-up
Once plugin-scaffold#7 ships in a release, bump
src/core/plugin-scaffold-pin.json. It still pinsv0.1.0.