Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 5

Github dependency graph API

Hey everyone! First of all, congrats on the dependency graph feature, it is incredibly useful, especially now that it also handles npm packages. The question is: is there a way to access it via API? It would be really helpful for us to monitor new projects using our libraries.

 

Thanks!

4 Replies
Highlighted
Community Manager
Message 2 of 5

Re: Github dependency graph API

I don't see anything about it in the developer documentation at https://developer.github.com and I don't see anything about it in the API Preview section either. You might be able to approximate it using a code search though. For example, this search finds package.json files that contain "greenkeeper":

 

https://github.com/search?utf8=%E2%9C%93&q=greenkeeper+in%3Afile+filename%3Apackage.json&type=Code

Highlighted
Ground Controller Lvl 1
Message 3 of 5
Highlighted
Copilot Lvl 2
Message 4 of 5

Re: Github dependency graph API

It would seem that the API provides access to dependencies, but not dependent projects. Maybe I'm missing something...?

Highlighted
Ground Controller Lvl 1
Message 5 of 5

Re: Github dependency graph API

That's my takeaway from the documentation, I have been trying to find a way to query that but so far no luck finding the dependents of a project, I guess it is not supported yet...