-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Switch GitHub Workflow Status Badge to API #4587
Comments
One of the things that's going to be interesting with this is that the Actions API only supports specifying the desired Workflow by id or by the yaml file name where the Workflow is defined https://developer.github.com/v3/actions/workflow_runs/#list-workflow-runs However.. our current Workflow Status badge (which is svg scraping the native badge because the API wasn't readily available back then) is based off a third identifier, the Workflow name. On order to maintain BC for those existing badges, I see two paths forward:
Would there be any quota hit concerns with that second option? My sense is that we've got plenty of quota with the existing GH token pool, though I'm not sure if folks would have concerns with making multiple GH calls to render one badge |
Have you got any updates on this? |
Ran into this issue while researching why my self hosted instance could create badges for things like commit activity but not for workflows. I assume this still isn't fixed. What's the current issue that needs to be resolved? No one just hasn't bothered making it yet? Should I take a look at it?
Can't you just do it as 2 queries, one for a complete list of all workflows in the repo, then match against the workflow name to get the id? Or maybe add a flag to change the behavior from workflow name to workflow id / yaml file? Personally I'd prefer specifying the yaml file since the name can result in a more awkward looking url. |
This is a useful bump in the context of:
We're looking at changing the current route anyway and switching to the yaml filename as the user supplied param anyway, so maybe that is the time to switch implementation too. I'll circle back to #8475 and have a look.. |
See #8671 for the details of the fix for this |
There's now GitHub Actions/Workflow specific APIs that are available, and we'll probably want to switch over to use them (we're currently svg scraping since APIs weren't readily available/limited when we first rolled out support)
Details on the v3 API linked below, though we should probably see if the v4 endpoints are available first.
https://developer.github.com/v3/actions/
#3898 (comment)
The text was updated successfully, but these errors were encountered: