Getting the status of a badge from a private repository

Hi,

I’m trying to get the status of a badge in a private repository, I’m doing this from an unauthenticated location and I’m receiving the expected 404 error message.

Can you tell me how should I add the access_token information to the GET method to actually be able to get its status?

Something like: https://github.com/xx/yy/workflows/zz/badge.svg?event=push&access_token=hhhh
Still returns 404.

Also setting the token in the header in the request:

headers: {‘Authorization’: ‘token hhhh’,
Still returns 404.

Thanks!

1 Like

Unfortunately private badge statuses are not exposed with our current URL structure. Sorry about that!

We are working to update the documentation to reflect the limitations of accessing a private badge status from outside the repository:

https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository

We really appreciate feedback on how we can make GitHub even better and the best way to report any feature requests is directly to us through our feedback form: https://support.github.com/contact/feedback

Our roadmap is not publicly visible, so we recommend that you keep an eye on the GitHub Blog for the latest announcements about new features.

1 Like