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

Github Workflow badges on private repos not working #4681

Closed
1 of 3 tasks
rainyroads opened this issue Feb 22, 2020 · 3 comments
Closed
1 of 3 tasks

Github Workflow badges on private repos not working #4681

rainyroads opened this issue Feb 22, 2020 · 3 comments
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas

Comments

@rainyroads
Copy link

Are you experiencing an issue with...

🪲 Description

Probably related to #4587
I'm guessing since you're currently just scraping this badge from GitHub, support for private repositories is currently not provided (even when you are running your own instance with a token provided).

I'm just noting this here as it is an issue I ran into. Hopefully once it's migrated over to the official API this will be resolved.

🔗 Link to the badge

https://badges.taiga.sh/github/workflow/status/FujiMakoto/ips-indisposable/IPS%20Stable/master

💡 Possible Solution

Only relevant to self-hosted instances, since this requires providing a token for access to private repositories.

Make sure once this is migrated to the official API that it can ideally access workflow status for private repositories.

@rainyroads rainyroads added the question Support questions, usage questions, unconfirmed bugs, discussions, ideas label Feb 22, 2020
@calebcartwright
Copy link
Member

hi @FujiMakoto 👋

Thank you for opening the issue, but this is expected behavior. The Shields.io service does not support badges based on content/artifacts in private GitHub repos (see #593).

We're currently providing our workflow status badges via svg scraping of the native GitHub badges, and it seems that GitHub does not provide anonymously accessible badges for workflows in private repositories.

Even when we change our internal implementation to leverage the API (#4587), this will still hold true as Shields will not be authorized to access your private repo.

If you want badges for your private GitHub repos you'd either need to self-host your own Shields server or use the Endpoint badge (outlined in more detail at the bottom of issue #593)

@rainyroads
Copy link
Author

Hey @calebcartwright !

Thanks for the reply. I actually do self-host my own Shields server for this reason. Just to confirm, when you do migrate to utilize the API (#4587), will this grant Shields access to my private repo so it can pull workflow status from it like it can for other badges on my private repos?

@calebcartwright
Copy link
Member

I actually do self-host my own Shields server for this reason

Oops! I see that now in your OP, apologies.

Just to confirm, when you do migrate to utilize the API (#4587), will this grant Shields access to my private repo so it can pull workflow status from it like it can for other badges on my private repos?

Yes. The API calls Shields issues to GitHub all include auth info in the request, so once Shields is switched to the API then the workflow status badges will just start working too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas
Projects
None yet
Development

No branches or pull requests

2 participants