Skip to content

Implement sanity checks in since, readme, and versions commands #1444

Open
@felixarntz

Description

@felixarntz

Over the past few months, several enhancements have been implemented to make the since, readme, and versions commands more intelligent so that they can automatically determine the relevant versions rather than requiring them as arguments, making these commands easier to use.

A potential downside of the way this currently works is that it can lead to errors, because the person running the command is no longer explicitly required to think about what the versions they want to prepare the code for actually are. For instance, you could run the since command anytime, leading to @since annotations in the new code being for a version that has already been released.

This issue proposes adding sanity checks to the version detection done by those command scripts. It should check to ensure that the version detected locally is not already available in WordPress.org, effectively leading to a more explicit requirement that the commands must only be used once the version has been bumped to the next version in plugin main file and readme.

More concretely, I'm proposing something along the lines of:

  1. After parsing the version from plugin main file / readme, check wordpress.org for that plugin.
  2. If this version is already released, skip running the process for said plugin, and emit a log that indicates that.
  3. If the version is not already released (including if the entire plugin is new), run the process for said plugin as usual.

This would give us peace of mind that we don't accidentally provide incorrect since annotations or create incorrect changelogs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    InfrastructureIssues for the overall performance plugin infrastructure[Type] EnhancementA suggestion for improvement of an existing feature

    Type

    No type

    Projects

    Status

    Definition ✏️

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions