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 actions badge not working on private repo #8398

Closed
danielgroen opened this issue Sep 14, 2022 · 3 comments
Closed

Github actions badge not working on private repo #8398

danielgroen opened this issue Sep 14, 2022 · 3 comments

Comments

@danielgroen
Copy link

Are you experiencing an issue with...

My own instance of shields

🐞 Description

I have a private repo on github.

Also i have my own hosted shields server:
https://githubshieldsio.herokuapp.com

This is all set with a PAT token so it should read all the info from the repo.

Now the badge of the workflow can't find the repo.
When i set the repo to public, then the badge does work!

🔗 Link to the badge

Example of a badge reading the same repo (but does work)
https://githubshieldsio.herokuapp.com/github/package-json/v/danielgroen/affiliate-program

The badge that doesn't work.
https://githubshieldsio.herokuapp.com/github/workflow/status/danielgroen/affiliate-program/prod

💡 Possible Solution

No response

@danielgroen danielgroen added the question Support questions, usage questions, unconfirmed bugs, discussions, ideas label Sep 14, 2022
@LitoMore
Copy link
Contributor

See #5676.

@chris48s
Copy link
Member

Unlike most of our github badges which call an API endpoint, this one is basically a scraper or wrapper for github's own badge that allows you to apply the shields styles/icons/etc to it.
You will find that if you call https://github.com/danielgroen/affiliate-program/workflows/prod/badge.svg when you're logged in to github, it works. If you call it when you're not logged in, its a 404. With all our other badges that use the GitHub API, providing a token allows us access to private resources. This badge is an outlier in this respect. If it is possible to use a token in the request (I've not checked), we'd happily take a PR for this but at the moment this specific badge won't work for private repos.

@chris48s chris48s added service-badge New or updated service badge and removed question Support questions, usage questions, unconfirmed bugs, discussions, ideas labels Sep 20, 2022
@calebcartwright calebcartwright removed the service-badge New or updated service badge label Sep 25, 2022
@calebcartwright
Copy link
Member

Going to close this as a duplicate of #4681 in favor of keeping things consolidated under #4587

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

4 participants