How are dependents calculated?

How exactly is the information displayed under Insights/Dependency graph/Dependents produced, e.g. here: https://github.com/OrchardCMS/OrchardCore/network/dependents? If we’re talking about a .NET project then NuGet package references are taken into account. But how does this work, how does GitHub know how a given NuGet package corresponds to a given GitHub repository? For example, the linked Orchard Core projects is used by many other projects on GitHub (it’s published as dozens of NuGet packages) but nothing shows up under Dependents.

Is the connection made via the Project site config on NuGet? Or the nuspec file somehow?

I’ve asked about this in e-mail too but support didn’t reply since 16 April.

Hi @piedone,

Thank you for being here! In general, packages are linked to repositories by our system and automatically assign respective packages algorithmically based on the existence of our supported file formats described here:

https://help.github.com/en/articles/listing-the-packages-that-a-repository-depends-on#supported-languages

I’ve run a job to redetect the manifests of that repository, and it looks like the network dependents list has been updated. Do things look as expected for you now?

Thanks for your reply, Andrea.

Now it’s better but still, nowhere near all the dependents show up. For example, this project doesn’t show up though it’s a web app similar to SeedCore, which does, referencing Orchard packages like here. E.g. this project referencing a lot of packages doesn’t show up either. There are many similar projects under different GitHub organizations/accounts that don’t show up either. All of these are .NET Core projects referencing one or more Orchard Core packages in .csproj files, as indicated as supported in the documentation page you linked. The “packages” references are very sparse too, there are dozens of NuGet packages depending on Orchard packages. None of these are particularly new so it’s not that they didn’t have time to show up (some of these have been out for many months at least).

So it seems to me that GitHub is not making the connection, just for a very small number of repositories and packages. Thus I’d still like to understand how GitHub figures out this connection: I understand that in the case of .NET, package references in e.g. the csproj are checked to see which packages a given project depends on. But from the other side, how is it determined that a given project in a repository (or multiple projects in a single repository) corresponds to which package? The project names match. The corresponding documentation page doesn’t help.

How can we fix this?