badges / badges/shields

Add submodules support on GitHub through `graphql` api

Open
#9,996 5 comments 0 reactions 0 assignees View on GitHub
service-badge
Dominant language
JavaScript
Stars
27.2k
Forks
5.6k
Avg merge
1d 8h
Merged PRs (30d)
46

Description

:clipboard: **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:

![image](https://github.com/badges/shields/assets/50760269/9acef7e2-cbe2-4160-900e-539562c26050)

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing repository-size, code-size, and comment data entry points and their GitHub GraphQL queries; the issue provides no file or test names. Clarify recursive depth and same-owner handling, then define tests showing that eligible submodule data is included in the affected shields.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, graphql, javascript
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.