Skip to content
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

Include package description and authors in packages.json #305

Open
tyrann0us opened this issue Jan 6, 2020 · 0 comments
Open

Include package description and authors in packages.json #305

tyrann0us opened this issue Jan 6, 2020 · 0 comments

Comments

@tyrann0us
Copy link
Contributor

Would it be possible to add a packages's (plugin/theme) description and authors to the generated packages.json file?

The WordPress API exposes these information. E.g. the v1.2 plugin API returns the following for https://api.wordpress.org/plugins/info/1.2/?action=plugin_information&request[slug]=akismet:

{
  "name":"Akismet Anti-Spam",
  […]
  "author":"<a href=\"https:\/\/automattic.com\/wordpress-plugins\/\">Automattic<\/a>",
  "author_profile":"https:\/\/profiles.wordpress.org\/automattic",
  […]
  "sections":{
    "description":"<p>Akismet checks your comments and contact form submissions against our global database of spam to prevent your site from publishing malicious content. […]",
    […]
  },
  […]
}

Also @Rarst's WPorg Client (which you use) seem to support these fields.

It would probably require some cleanup (remove HTML tags from author field) and truncation (only use one sentence for description) but because these fields would end up in the project's composer.lock file it would provide useful information about the package.
For the required structure of the fields refer to the corresponding properties in https://getcomposer.org/schema.json.

What do you think? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants