-
-
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add submodules support on GitHub through graphql
api
#9996
Comments
For some shields that can introduce this function, we can add |
A slight issue here is that the submodule object isn't a full repository object. It only exposes quite a limited number of properties. https://docs.github.com/en/graphql/reference/objects#submodule
As far as I can tell, things like I think I'd want Which badges are you thinking this would apply to? |
As you said, it does require a second query to get the exact information, but I think it is worth it. Of course, in order to relieve the pressure on the server, this attribute should be turned off by default. I think this property can be applied to the following shield first: |
I think I agree with the first 3 馃憤 Not sure about stars. If I make a repo and pull in https://github.com/freeCodeCamp/freeCodeCamp as a submodule, my repo now has >300k stars? 馃槃 |
We could only count submodules' stars when they are owned by same owner, which could be better. |
馃搵 Description
Currently, more and more projects use git submodules to split the project architecture, leaving an almost empty main repository (almost only references to submodules)
However, when counting data such as repo size/code size/comments, shields does not take the data of submodules into consideration.
Currently, GitHub GraphQL Api can already query submodules under a warehouse.
As long as the recursive search (specifying the front depth) is required, a submodule tree of the warehouse can be constructed.
The shields (repo size, etc.) mentioned above can be more accurate. (Of course, we may have to verify that the repositories belong to the same owner)
Take my own repo for example:
The text was updated successfully, but these errors were encountered: