Add submodule support to GitHub tag
On GitHub the submodule is only shown as a commit id.
I would like to know the tag (if any) associated with that tag.
eg: https://img.shields.io/github/v/tag/:user:/:repo:/:submodule:
Would that be possible?
I think git submodules are only associated with a commit, not a tag Tag isn't an available field https://docs.github.com/en/graphql/reference/objects#submodule
Is it possible to get the tag from a commit id? Well, I guess it is possible by searching the tags in the submodule repository. Is that too much work though?
I think there's a couple of problems.
Ideally we should be able to fetch the data we need to render a badge in a single API call for performance reasons (we need to be able to fetch the data and render the badge inside a request/response cycle). This would require multiple calls and worst-case could require paging over results to find a match. I don't think there is a direct API query for "get all tags for this commit hash"
The other one is that a tag is associated with exactly one commit, but a commit can be associated with many tags. Many repos use a linear tag history, but for example if you consider a repo like https://github.com/gatsbyjs/gatsby the commit e8e17e77 is tagged with
but if all you have is e8e17e77, how would you choose which one?
I think this one would be impractical, unfortunately.
I also think the conversation and concerns articulated on #4934 remain relevant and would move to close this (with #9996 continuing to have some submodule related badges worth potentially considering)