[wp-meta] [Making WordPress.org] #4447: Create an easier way to trac contributions across GitHub and Trac
Making WordPress.org
noreply at wordpress.org
Wed Mar 25 03:14:39 UTC 2020
#4447: Create an easier way to trac contributions across GitHub and Trac
-------------------------+---------------------
Reporter: desrosj | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Profiles | Resolution:
Keywords: |
-------------------------+---------------------
Comment (by dd32):
In dotorg15863 I've added a rest api endpoint:
`https://profiles.wordpress.org/wp-json/wporg-
github/v1/lookup/$github_user`
eg:
{{{
$ curl https://profiles.wordpress.org/wp-json/wporg-github/v1/lookup/dd32
-s | jq
{
"slug": "dd32",
"profile": "https://profiles.wordpress.org/dd32"
}
$ curl https://profiles.wordpress.org/wp-json/wporg-github/v1/lookup/dd321
-s | jq
{
"code": "user_not_linked",
"message": "Github Account not linked.",
"data": {
"status": 404
}
}
}}}
The HTTP Status code is set to 200/404 depending on if it's linked or not.
Let me know if I should slim it back to just the slug (ie. `"dd32"` as the
entire response) or if other details are needed.
(cc @schlessera)
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/4447#comment:20>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list