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

Badge request: docs.rs #1382

Closed
suhr opened this issue Dec 20, 2017 · 6 comments · Fixed by #6098
Closed

Badge request: docs.rs #1382

suhr opened this issue Dec 20, 2017 · 6 comments · Fixed by #6098
Labels
needs-upstream-help Not actionable without help from a service provider service-badge New or updated service badge

Comments

@suhr
Copy link

suhr commented Dec 20, 2017

See https://docs.rs/about

@paulmelnikow
Copy link
Member

Hi! Thanks for the suggestion. Is there a JSON API that returns the build status?

The red badge doesn't convey the failing doc build very clearly. I wonder if we should provide some more helpful text like docs | build failed.

@paulmelnikow paulmelnikow added service-badge New or updated service badge question Support questions, usage questions, unconfirmed bugs, discussions, ideas and removed service-badge New or updated service badge labels Dec 21, 2017
@onur
Copy link

onur commented Dec 24, 2017

Hi @paulmelnikow. We have a JSON API to check build status, example URL for cargo-0.23.0: https://docs.rs/crate/cargo/0.23.0/builds.json. This will return a list of builds and first one in the list is always the very latest build attempt. build_status will tell you if build was a success or not.

Unfortunately this JSON API will always require a version to work (it is actually only designed to work with crates.io). Docs.rs badge URL doesn't require any version.

@paulmelnikow
Copy link
Member

Ah, gotcha. Hmmm, well we could parse the badges. Is a build status endpoint something you'd consider adding? Hitting a JSON API is more reliable.

spacekookie added a commit to clap-rs/thunder that referenced this issue Mar 31, 2018
@paulmelnikow
Copy link
Member

Ref: rust-lang/docs.rs#170

@paulmelnikow paulmelnikow added service-badge New or updated service badge needs-upstream-help Not actionable without help from a service provider and removed question Support questions, usage questions, unconfirmed bugs, discussions, ideas labels Jan 7, 2019
@paulmelnikow paulmelnikow changed the title Badge for docs.rs Badge request: docs.rs Jan 28, 2019
@blakehawkins
Copy link

To help progress this request, can I suggest starting with a MVP that just links to docs.rs/crate/?

cargo publish by default will build docs in advance, so docs.rs should rarely have failing docs builds.

The following works great for me:

[![Docs badge]][docs.rs]

[Docs badge]: https://img.shields.io/badge/docs.rs-rustdoc-green
[docs.rs]: https://docs.rs/mycrate/

@paulmelnikow
Copy link
Member

A question was just posted about this at rust-lang/docs.rs#170. If anyone has interest and capacity to respond, please do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-upstream-help Not actionable without help from a service provider service-badge New or updated service badge
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants