Markdown to indicate existence of open PRs in another repo?

I’ve got a repo which has a guide to work on ~50 other repos.

One of the things we have to do regularly is check for outstanding PRs, as well as see what the latest release version is.

Right now I have links in the guide, like this:

1. zoinks-test-utils [releases](https://github.example.com/zowie/zoinks-test-utils/releases/)⟦[latest](https://github.example.com/zowie/zoinks-test-utils/releases/latest)⟧ 🇵🇷 [PRs](https://github.example.com/zowie/zoinks-test-utils/pulls) ⽬ [develop POM](https://github.example.com/zowie/zoinks-test-utils/blob/develop/pom.xml)

which renders like this … well, no, I’m a new user so had to remove the first and last links:

  1. zoinks-test-utils releaseslatest:puerto_rico: PRsdevelop POM

The problem is that this means developers have to click on each link — 2 per repo — just to see the current latest release label and whether there are any open PRs (mostly there aren’t).

Something like a badge displaying the count of open PRs, or a yes/no flag, anything like that would be great. Since it’s all within the same GitHub (same org, even), there should be no need for authentication.

For the latest release, I’d just like the tag … via markdown that would evaluate an imagined API like https://github.example.com/zowie/zoinks-test-utils/releases/latest?tagOnly=true.

Unfortunately, the GitHub v3 ReST API and v4 GraphQL are unusable as such in Markdown (AFAIK).

Does anyone know of a GitHub app that will do either of these? Or some clever trick to avoid dozens of fruitless clicks?

I bet you could use shields.io, let me see.

That would be excellent. I looked there, but I couldn’t find anything that would work by calling GitHub itself, nor have I seen a GitHub app that could be installed to return badge info (about a GitHub repo).

Maybe I should write one … :thinking:

You might be able to use the badge support in GitHub Actions to do something like this? If you created a workflow that checked periodically to see if there are open PRs, failing if there are open PRs and succeeding if there aren’t, then the badge would operate as a yes/no flag as you described. I don’t know of a way to change the “passing” and “failing” verbiage but maybe that’ll be good enough for now?

Have you taken a look at https://shields.io/category/issue-tracking? There are options for GitHub pull requests.