Is there any API/command to fetch the GitHub source URLs for input packages ?

We have to fetch the GitHub source URLs for all input dependencies , is there any API or command to achive this ?

Let’s say we have following input list :

time
file
shellcheck
git
curl
python-pip

I tried using command “github.search_repositories(q, sort=‘stars’, order=‘desc’)” to identify repos based on highest star rating etc, but that may not necessarily give us the correct result. 

Any input would be appriciated , Thank you in advance :slight_smile:

Hi @sandipmgiri,

Could you tell me a bit more what you’re trying to do? I’m not entirely sure that I understand your question. GitHub does not run any dependency manager tools, so we don’t have any API for dependency management as such.

Thanks!

Thanks for the reply !!

I want to get the licenses for eveything installed on my system using only their(dependency) name from github source tree.
To do so, first I need to fetch the github source URLs for all dependencies. Once we get the source URLs then we can pass to “Licensee: A Ruby Gem to detect under what license a project is distributed.”
I found many ways to get different information on the github api documentation page but none to get the source URL. Is there any way to easily get it?

e.g. for input “git” dependency expected output is “https://github.com/curl/curl.git”.

If you’re using RubyGems to manage your dependencies, GitHub doesn’t have an API to resolve from the dependency name to the GitHub repository. That information is managed by https://rubygems.org/. You would have to use their API to determine the GitHub URL from the dependency name.

I hope that helps!