-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support 'wporg_status' and 'wporg_last_updated' as optional wp plugin list
fields
#382
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
0c695a5
Plugins show their .org status.
janw-me 342aaa1
Split the fields to check for wporg and date seperatatly.
janw-me 51b645b
Temp behat file to check
janw-me 8d05f43
Merge branch 'main' of github.com:wp-cli/extension-command
janw-me 28f9a97
Added hints for behat that need to be implemented.
janw-me bcbb215
phpcs fixes.
janw-me 37472a1
Also add wp-org checks to mu-plugins.
janw-me 665a5eb
Added behat tests.
janw-me 1cec36e
Allow to select the status on wporg as a single field.
janw-me d12a9a6
Added Behat tests.
janw-me d7ec274
Better check for active plugins.
janw-me fd9a235
Renamed wporg keys
janw-me 71a1d23
Replaced the api.wp call with the appropriate class.
janw-me a171f4c
replaced test plugin Akismet, because it's failing php version tests.
janw-me a6e5b0b
Fixed a missed rename.
janw-me 096ab96
Dropins need a hardcoded exception for wp.org status.
janw-me f5895b8
Removed all no_wp_org key words.
janw-me 09d1311
Merge remote-tracking branch 'origin/main'
janw-me c927a46
Fix the feature name in Behat
danielbachhuber 9d97c95
Add an example to the command doc
danielbachhuber 1dc730e
Regenerate README
danielbachhuber File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Feature: Check the status of plugins on WordPress.org | ||
|
||
@require-wp-5.2 | ||
Scenario: Install plugins and check the status on wp.org. | ||
Given a WP install | ||
|
||
When I run `wp plugin install wordpress-importer --version=0.5 --force` | ||
And I run `wp plugin install https://downloads.wordpress.org/plugin/no-longer-in-directory.1.0.62.zip` | ||
And a wp-content/plugins/never-wporg/never-wporg.php file: | ||
""" | ||
<?php | ||
/** | ||
* Plugin Name: This plugin was never in the WordPress.org plugin directory | ||
* Version: 2.0.2 | ||
*/ | ||
""" | ||
|
||
When I run `wp plugin list --name=wordpress-importer --field=wporg_last_updated` | ||
Then STDOUT should not be empty | ||
And save STDOUT as {COMMIT_DATE} | ||
|
||
When I run `wp plugin list --fields=name,wporg_status` | ||
Then STDOUT should be a table containing rows: | ||
| name | wporg_status | | ||
| wordpress-importer | active | | ||
| no-longer-in-directory | closed | | ||
| never-wporg | | | ||
|
||
When I run `wp plugin list --fields=name,wporg_last_updated` | ||
Then STDOUT should be a table containing rows: | ||
| name | wporg_last_updated | | ||
| wordpress-importer | {COMMIT_DATE} | | ||
| no-longer-in-directory | 2017-11-13 | | ||
| never-wporg | | | ||
|
||
When I run `wp plugin list --fields=name,wporg_status,wporg_last_updated` | ||
Then STDOUT should be a table containing rows: | ||
| name | wporg_status | wporg_last_updated | | ||
| wordpress-importer | active | {COMMIT_DATE} | | ||
| no-longer-in-directory | closed | 2017-11-13 | | ||
| never-wporg | | | |
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we only make this request if we're checking for the date?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a better check in d7ec274
The answer is, not always,
When the call to api.wp is not succesfull, we need to check the SVN to distinguish between closed and never on .org.