close
Skip to content

Include package description and authors in packages.json #305

@tyrann0us

Description

@tyrann0us

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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions