badges / shields

Concise, consistent, and legible badges in SVG and raster format
https://shields.io
Creative Commons Zero v1.0 Universal
23.08k stars 5.47k forks source link

Azure DevOps - Build Badge - PAT Token not used on private projects #10162

Open mjpitt opened 2 months ago

mjpitt commented 2 months ago

Are you experiencing an issue with...

My own instance of shields

🐞 Description

Our organisation has strict rules on access, as such anonymous access to badges is disabled.

I have configured PAT token and other Azure DevOps badges work great, the build badges however do not use the PAT token as part of the requests, as such are not able to access the projects.

🔗 Link to the badge

https://shields.io/badges/azure-dev-ops-builds-branch https://shields.io/badges/azure-dev-ops-builds

💡 Possible Solution

Implement fetch using auth (if PAT provided) as other Azure DevOps badges do.

chris48s commented 2 months ago

Having had a quick look over the code, some of our azure devops badges get their data from the azure devops api (and will use auth if provided). Some of them are essentially "scrapers" for azure's native badges, and don't use auth. I think in order to support auth for all of them, we'd need to switch all of them to get their data from the API. We have this issue with a couple of other platforms (GitLab is one example), and it is not always the case that we can replicate the functionality exactly using data exposed via the API. If someone wants to work on this, the first step on this one is to work out if we can replicate the existing functionality using the data exposed by the API.