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
bad appveyor badges for projects with underscore #587
Comments
Do you know, or have links for, when in general mangling is needed? I think fixing this will involve adding a |
I'm not aware of any documented mangling. For fun I just created a new github repo and added it to appveyor, and sure enough the underscore was converted to a dash in the URL. Could the unmangled repo name be dug out from here?:
|
Alternatively, that settings page also contains...
And with that the badge can be fetched more robustly: https://ci.appveyor.com/api/projects/status/rssa03e29mxou4hv?svg=true |
When I go to the settings page I get
|
I think crates.io should expect an unmangled name, so you should specify: [badges]
appveyor = { repository = "goertzenator/erlang_nif-sys" } Then the appveyor component should have another computed property that replaces And then badge-appveyor.hbs should use |
I agree with that direction @carols10cents , but I'd like to suggest some refinements:
The motivation for this come from this bug in which the Appveyor project name does not follow changes in repository name. Being able to separately specify
|
That all sounds good, @goertzenator! Also the documentation (that lives in cargo) should be updated to reflect whatever gets implemented here. |
@carols10cents, @goertzenator If no one is working on this, I wouldn't mind giving it a shot. |
…lexcrichton Update docs for appveyor badge. Can now optionally specify the appveyor `project_name`. Related PR: [rust-lang/crates.io#1111](rust-lang/crates.io#1111) Related Issue: [rust-lang/crates.io#587](rust-lang/crates.io#587)
1111: Fix appveyor badge display and link. r=carols10cents This fixes an issue with appveyor badges where if your repository name included an underscore, the link generated would not work because appveyor urls use dashes. You can now specify an optional `project_name` for the appveyor badge in your `Cargo.toml` ``` [badges] appveyor = { repository = "example/test_crate", service = "github", project_name = "example/test-crate" } ``` If the optional `project_name` attribute is present, we will use that for the link URL, otherwise we default to the required `repository` attribute and replace the underscores with dashes. The reason to provide the `project_name` option is that if you change the repository name appveyor doesn't track the change. Let me know if I missed anything! I did create a test crate and set it up with appveyor to confirm. Closes #587
was this fix deployed to crates.io? because it doesn't work for me |
Not yet, sorry! Will deploy right now. |
thanks |
Add `project_name` attribute to appveyor badge. There was a recent [issue](rust-lang/crates.io#587) in crates.io where appveyor is looking for a dash separated URL for the link to appveyors site: ``` https://ci.appveyor.com/project/rust-lang-libs/libc ``` and the actual repo name for the image badge url: ``` https://ci.appveyor.com/api/projects/status/github/rust-lang/libc?svg=true ``` We recently added the ability to specify a `project_name` that fixes this issue. You'll notice that currently on https://crates.io/crates/libc the appveyor badge on the right sidebar show `build unknown`, this PR will address that issue. Please let me know if you have any questions.
The appveyor badge on https://crates.io/crates/erlang_nif-sys does not load, however the link does work when clicked.
The problem is that the link to the appveyor project requires underscores converted to dashes, but the link to the badge requires an unmangled name. The current crates.io code appears to use the same name for both.
I currently use a premangled repository name in the badges section:
The resulting broken badge URL
https://ci.appveyor.com/api/projects/status/github/goertzenator/erlang-nif-sys?svg=true&branch=master
The corrected URL is:
https://ci.appveyor.com/api/projects/status/github/goertzenator/erlang_nif-sys?svg=true&branch=master
I expect I could make the badge image to work by changing the badge setting to
appveyor = { repository = "goertzenator/erlang_nif-sys" }
, but then the link would break. I think both should work.The text was updated successfully, but these errors were encountered: