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
Wrong AppVeyor badge #693
Comments
Hm, these docs: https://github.com/appveyor/website/blob/master/src/docs/status-badges.md#badges-for-projects-with-public-repositories-on-github-and-bitbucket say that we're allowed to use that URL :-/ |
Feature request: given that the inferred badge URL is unreliable, I would like to be able to set the project id and get a reliable badge. [badges]
appveyor = { repository = "serde-rs/serde", id = "avsuce1irt8h63u2" } |
:( i suppose we'll have to do that :( |
this is part of fixing issue rust-lang#693 ✅ Add an id field with type Option<String> to the Appveyor badge enum variant ✅ Add id: alias('badge.attributes.id') to the appveyor badge component ✅ Add an image-url attribute, computed from the id to the appveyor badge component that checks to see if id is defined. (I've used `imageUrl` as attribute) ✅ Change the appveyor badge template to use the image-url attribute for the img src instead ✅ Publish a crate to your local instance that has the URLs dtolnay has listed for serde and manually verify the badge is displayed correctly.
* indicate you can specify the appveyor project id if you want to use that instead This PR is part of: rust-lang/crates.io#693
Hi @dtolnay @carols10cents I have made a PR that addresses this issue. 🙂 |
…chton Update Appveyor badge docs * indicate you can specify the appveyor project id if you want to use that instead This PR is part of: rust-lang/crates.io#693
1050: Fix Wrong AppVeyor badge r=carols10cents this is part of fixing issue #693 - [x] Add an id field with type Option<String> to the Appveyor badge enum variant - [x] Add id: alias('badge.attributes.id') to the appveyor badge component - [x] Add an image-url attribute, computed from the id to the appveyor badge component that checks to see if id is defined. (I've used `imageUrl` as attribute) - [x] Change the appveyor badge template to use the image-url attribute for the img src instead - [x] Publish a crate to your local instance that has the URLs dtolnay has listed for serde and manually verify the badge is displayed correctly. - [x] Send a pull request to cargo to update the badge documentation to indicate you can specify the appveyor project id if you want to use that instead. (_https://github.com/rust-lang/cargo/pull/4489_)
@dtolnay @carols10cents Looks like this was supposed to be closed with #1050! |
https://crates.io/crates/serde is showing a badge from:
The link is correct and shows that the build is passing, but the badge says "unknown".
AppVeyor tells me to use the following badge:
Unclear how this is generated but it would be nice if I could have crates.io show the correct badge.
Implementation steps added by @carols10cents:
id
field with typeOption<String>
to the Appveyor badge enum variantid: alias('badge.attributes.id')
to the appveyor badge componentimage-url
attribute, computed from the id to the appveyor badge component that checks to see ifid
is defined; if it is, returnhttps://ci.appveyor.com/api/projects/status/{{ id }}/branch/{{ branch }}?svg=true
. If not, returnhttps://ci.appveyor.com/api/projects/status/{{ service }}/{{ repository }}?svg=true&branch={{ branch }}
(that's what the appveyor badge template currently uses for the image src)image-url
attribute for the img src insteadThe text was updated successfully, but these errors were encountered: