wp-cli / extension-command

Manages plugins and themes, including installs, activations, and updates.
MIT License
90 stars 79 forks source link

Support 'wporg_status' and 'wporg_last_updated' as optional `wp plugin list` fields #382

Closed janw-me closed 11 months ago

janw-me commented 1 year ago

Fixes idea#36

Extends wp plugin list with the fields:

These fields will take a look at the status of the plugin on wordpress.org and if it ever was a .org plugin it can display the last commit date.

Related https://github.com/wp-cli/wp-cli/issues/5859

schlessera commented 1 year ago

@janw-me the API-specific stuff should be included in the WpOrgApi class found in wp-cli/wp-cli.

janw-me commented 1 year ago

I'd like to standardize on wporg_status and wporg_last_updated as the key names.

Relabeling done in: fd9a235c99bc1e6793f90a954e6cbbc424a29f0f

janw-me commented 1 year ago

@janw-me the API-specific stuff should be included in the WpOrgApi class found in wp-cli/wp-cli.

Fixed in 71a1d231c76f0f76e1387e3e98ed9295c80b22a4 Personally I don't think this is better, as this does the whole request instead of the HEAD. But I also value consistency , so fine.

schlessera commented 11 months ago

Personally I don't think this is better, as this does the whole request instead of the HEAD.

@janw-me Note: The WpOrgApi class can be adapted to make sure it fulfills all the requirements, of course. It is not considered feature-complete at this point and was meant to be extended/improved as needed.

I'll see how we can adapt it so it does not unnecessarily do the full request.

danielbachhuber commented 11 months ago

@janw-me Once your PR is ready, can you also update the PR description with details on how the new feature works? Thanks!

janw-me commented 11 months ago

I made a couple of tweaks (c927a46, 9d97c95) and regenerated the README (1dc730e).

Great additions.

Also, as a FYI for the future, please create a feature branch for pull requests as it makes things a bit easier to work with.

Will keep this in mind next time :+1: