shields icon indicating copy to clipboard operation
shields copied to clipboard

Badge Request: Support ReadTheDocs Business Tiers

Open rashidnhm opened this issue 1 year ago • 4 comments

:clipboard: Description Currently the support for ReadTheDocs only consist of their free community tier. However, we wanted to use shields to display badges for projects hosted on their Business tiers as well.

:link: Data The data can be fetched very similar to how it is being done currently on the readthedocs service, the main difference here is adding support for readthedocs.com as well.

ReadTheDocs business do support private repositories, getting badges for those may require a token which would be provided by the user.

:microphone: Motivation Use shields with projects hosted on readthedocs.com . Usage of dynamic URLs are not as feasible since the color would be static. And we do not want to standup our own endpoint to get the badge. Supporting this would be a good addition to shields.

rashidnhm avatar Aug 23 '22 16:08 rashidnhm

I think the move here is to make the routes

/readthedocs.org/:packageName /readthedocs.com/:packageName

and set up a redirect which maps /readthedocs/:packageName to /readthedocs.org/:packageName

for backwards0compatibility.

For private projects that require a token, is it possible to generate a readthedocs.com token that would not allow access to any sensitive data?

chris48s avatar Aug 24 '22 18:08 chris48s

Hello @chris48s

Yes! The token is actually something that is auto-generated by RTD on the project dashboard and it does seem it is scoped to the badge itself only. I have attempted using the token to try and fetch other information from their rest api and got the following response:

{"detail":"Invalid token."}

rashidnhm avatar Aug 29 '22 19:08 rashidnhm

Hey @chris48s , can you assign me this issue so that I can get started working on it ?

itsajay1029 avatar Nov 06 '22 09:11 itsajay1029

Hello all, wanted to see if there was any updates regarding this issue?

rashidnhm avatar Jun 21 '23 14:06 rashidnhm