Closed timelsass closed 5 years ago
I'm not sure if there is an API call for that on wordpress.org. I've looked at the documentation but couldn't find anything about it: https://codex.wordpress.org/WordPress.org_API
yeah i don't think there's a specific endpoint, but we could do something like wp_remote_get (https://profiles.wordpress.org/$contributor_name ) and check if response gets redirect to wp.org (profile doesn't exist)
actually that seems like the right thing to do anyways since the readme parser is doing that for plugins - taking the user and wrapping it in html with a link built like that.
I've asked on slack, and will see what Otto will say about it, since he's kinda maintaining all the wp.org api and infrastructure regarding plugins and the site 🙂
Apparently you were right, it's just checking the profiles. So if the status_code
is 302, that means that the user doesn't exits and we can report it as an error :+1:
I've merged this, so the issue can be closed. Thanks!
Feature Request:
We should check the contributors field for wp.org usernames and throw and error when the usernames listed aren't valid so the author can remove and/or fix them.