GitHub supports listing the projects that depend on a repository. Can I extract the events (e.g. time) of these dependencies by GitHub API? If not, how can I get this information?
Asked
Active
Viewed 257 times
0
-
I guess you'd have to look for the commits that introduced the dependency, but that might not be easy to automate. – jonrsharpe Apr 02 '20 at 09:46
-
I think so. Thank you for your reply! – Sunflowers Apr 02 '20 at 12:13
1 Answers
0
GitHub API v4 supports this feature in "preview" as of April 2018: https://developer.github.com/v4/previews/#access-to-a-repositories-dependency-graph.
I tried the following query, but the results seem strange to me.
{
repository(owner:"tensorflow", name:"tensorflow") {
dependencyGraphManifests{
totalCount
}
}
}
The result is:
{'data': {'repository': {'dependencyGraphManifests': {'totalCount': 14}}}}
I tried to know why the totalCount
is 14, so I run the following statments:
{
repository(owner:"tensorflow", name:"tensorflow") {
dependencyGraphManifests{
edges{
node{
repository{
name
}
}
}
}
}
}
The result is:
{'data': {'repository': {'dependencyGraphManifests': {'edges': [{'node': {'repository': {'name': 'tensorflow'}}}, {'node': {'repository': {'name': 'tensorflow'}}}, {'node': {'repository': {'name': 'tensorflow'}}}, {'node': {'repository': {'name': 'tensorflow'}}}, {'node': {'repository': {'name': 'tensorflow'}}}, {'node': {'repository': {'name': 'tensorflow'}}}, {'node': {'repository': {'name': 'tensorflow'}}}, {'node': {'repository': {'name': 'tensorflow'}}}, {'node': {'repository': {'name': 'tensorflow'}}}, {'node': {'repository': {'name': 'tensorflow'}}}, {'node': {'repository': {'name': 'tensorflow'}}}, {'node': {'repository': {'name': 'tensorflow'}}}, {'node': {'repository': {'name': 'tensorflow'}}}, {'node': {'repository': {'name': 'tensorflow'}}}]}}}}
Can anyone know why?

Sunflowers
- 67
- 8