Opened 9 months ago
Last modified 4 months ago
#7385 new enhancement
Review: Append some information to the ZIP urls
Reported by: | dd32 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | high | |
Component: | Plugin Directory | Keywords: | |
Cc: |
Description
When a plugin is in review state, reviewers often copy the download URL and pass that to a script to help run their reviews.
It would be helpful to the reviewers if there was an easy way to infer extra details about the plugin while performing the review.
So far the only thing requested has been the slug
of the plugin in the ZIP, but I expect that it would be helpful to know the ID
of the in-review plugin post and possibly other items in the future.
It seems the simplest way right now to provide scripts with extra details is just to append to the ZIP URL, ie https://wordpress.org/plugins/.....dsplugin.zip?slug=d-test-plugin&post_id=12345&....=....
cc @frantorres @davidperez
Change History (14)
#2
@
9 months ago
I think it would be great to have:
- Plugin slug.
- Plugin ID.
- Author username.
- Author email.
- Plugin status in the repository (so we know we are checking a new plugin or a plugin already published in the repository)
The domain of the header URI won't be needed as that will be already in the plugin files and can be taken from there.
#5
@
5 months ago
The above changeset adds a link to a private API endpoint that details information about the plugin the ZIP is attached to.
The API data is the same as the regular plugin_information
API endpoint, but for pending plugins, with some additional fields.
For example, you'd see:
{ "ID": 12345, "post_status": "new", "edit_url": "https://wordpress.org/plugins/wp-admin/post.php?action=edit&id=12345", "submitter": { "user_login": "example_user_login", "user_email": "user_email@example.org" }, # Everything below this point would be the same as from plugin_information "name": "Test Plugin", "slug": "d-test-plugin", "version": "1.0", ....
The API endpoint is attached to the ZIP urls in wp-admin, for example:
https://wordpress.org/plugins/files/example-file-upload.zip?info=https%3A%2F%2Fwordpress.org%2Fplugins%2Fwp-json%2Fplugins%2Fv1%2Fpending-plugin%2F12345-md5tokenhere%2F
Additional data/fields can be added as needed.
#9
@
5 months ago
Followup requests from the team:
- Make it work for all plugins, not just pending plugins.
- Make the plugin ZIP links in Helpscout have the API too.
- Reviewer api to get next review in queue
The API should also:
- Include the pending ZIPs in the output (ie. for non-published plugins)
I'm thinking of changing the API from .../pending-plugin/{id}-{token}/
to .../plugin-review/{id}-{token}/
instead, and see about .../plugin-review/
(or POST plugin-review/fetch-and-assign
.. Which will probably require an authenticated API request with an app password, where as the existing pending api was auth'd via the token in the URL only to side-step auth issues.
I see a good solution before we could get that info via API. I'd suggest to add the email of the author and domain of the header uri, so we could check the owner issues.