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 images displaying status unknown when they are known #1525

Open
carols10cents opened this issue May 2, 2017 · 17 comments
Open

Badge images displaying status unknown when they are known #1525

carols10cents opened this issue May 2, 2017 · 17 comments

Comments

@carols10cents
Copy link

Hi, not sure if this is related to #1288 or #1468, but I'm currently seeing "build: unknown" badges when I expect the build to be known :-/

Example page attempting to display a badge: https://crates.io/crates/serde

HTML for the badge, currently displaying the badge: unknown image for https://ci.appveyor.com/api/projects/status/github/serde-rs/serde?svg=true&branch=master:

<a href="https://ci.appveyor.com/project/serde-rs/serde">
    <img src="https://ci.appveyor.com/api/projects/status/github/serde-rs/serde?svg=true&branch=master" alt="Appveyor build status for the master branch" title="Appveyor build status for the master branch" height="20" width="106">
</a>

Project in Appveyor showing a successful build currently: https://ci.appveyor.com/project/serde-rs/serde, more specifically, the last build on the master branch succeeded: https://ci.appveyor.com/project/serde-rs/serde/build/1.0.229

Am I doing something wrong?

rust-lang/crates.io#693

@carols10cents
Copy link
Author

URLs for this project like https://ci.appveyor.com/api/projects/status/avsuce1irt8h63u2/branch/master?svg=true render the badge as I would expect, but I'd rather use the github/org/repo urls to avoid either my code having to look up the appveyor identifier somehow or making my users look it up :-/

@dtolnay
Copy link

dtolnay commented May 2, 2017

Interestingly the other project in this account seems to work.

https://ci.appveyor.com/api/projects/status/github/serde-rs/json?svg=true&branch=master

@FeodorFitsner
Copy link
Member

There are two projects in AppVeyor with serde-rs/serde repo. The project should be unique for badge with repo name in URL to work.

@FeodorFitsner
Copy link
Member

https://ci.appveyor.com/project/erickt/serde was created back in Sep 2015 and never built.

@dtolnay
Copy link

dtolnay commented May 2, 2017

Thanks! I reached out to erickt. Is there any way to prevent our badge from being intentionally or unintentionally DOS'ed by someone duplicating the project, other than using the badge at the avsuce1irt8h63u2 project code? Also if someone does make a duplicate of our project, is there a way for us to track it down on our end or would we need your help again with a support ticket?

@FeodorFitsner
Copy link
Member

You can't prevent someone from creating a duplicate project. Yes, you are always welcome to submit a ticket to sort it our in case of any issues.

@carols10cents
Copy link
Author

Wait, so if someone forks a project and then enables appveyor on their fork, will the original repo have this problem?

@FeodorFitsner
Copy link
Member

Nope, as forked repo will have a different {owner}/{repo} name.

@carols10cents
Copy link
Author

So how did erickt/serde end up with the same name as serde-rs/serde? https://github.com/erickt/serde/

@dtolnay
Copy link

dtolnay commented May 2, 2017

I think erickt/serde at some point got transferred to serde-rs/serde and then erickt forked it from serde-rs/serde back to erickt/serde.

@FeodorFitsner
Copy link
Member

He could be a owner/collaborator in that repo or, alternatively, he could edit repository name on project settings in AppVeyor.

@carols10cents
Copy link
Author

he could edit repository name on project settings in AppVeyor.

I'm not sure why this is allowed, if appveyor's access to github is managed through github oauth?

@FeodorFitsner
Copy link
Member

Everyone can setup a new project building any public repository. Obviously, they won't be able to setup webhook for that project or put commit statuses as they don't have "write" rights, but anyone can "read" public repos.

@carols10cents
Copy link
Author

Everyone can setup a new project building any public repository. Obviously, they won't be able to setup webhook for that project or put commit statuses as they don't have "write" rights, but anyone can "read" public repos.

Ok, it's just unfortunate that this affects the official project's badge :(

@FeodorFitsner
Copy link
Member

That's why badge ID should be used.

@carols10cents
Copy link
Author

That's why badge ID should be used.

It's another annoyance to have to look up that badge ID.... other services that have badges don't have this problem....

@carols10cents
Copy link
Author

Also perhaps owner/repo badges should be entirely disabled then, if they're not guaranteed to work?

aslakhellesoy added a commit to cucumber/cucumber-ruby that referenced this issue Oct 20, 2017
The Appveyor badge shows "failing" even though the build is passing.

According to appveyor/ci#1525 they are completely broken.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants