Support private git servers (like Github Enterprise instances)
Is your feature request related to a problem? Please describe. I would like to run scorecard for a repository that is hosted on my Github Enterprise instance. I currently can't.
$ scorecard --repo github.corp.net/nv35/myrepo
2021/07/05 09:24:35 unsupported host: github.corp.net
Describe the solution you'd like Allow to use the others github instances just like the .com one. The API path would likely just change from https://api.github.com/ to https://github.corp.net/api/v3, and I guess the calls would just be the same.
Additional context The restriction to github.com is defined here: https://github.com/ossf/scorecard/blob/1f1e05b22ccfac2c389125cdbc5be0bc61a52c1e/repos/repo_url.go#L77
Is your feature request related to a problem? Please describe. I would like to run scorecard for a repository that is hosted on my Github Enterprise instance. I currently can't.
$ scorecard --repo github.corp.net/nv35/myrepo 2021/07/05 09:24:35 unsupported host: github.corp.netDescribe the solution you'd like Allow to use the others github instances just like the .com one. The API path would likely just change from https://api.github.com/ to https://github.corp.net/api/v3, and I guess the calls would just be the same.
Additional context The restriction to github.com is defined here:
https://github.com/ossf/scorecard/blob/1f1e05b22ccfac2c389125cdbc5be0bc61a52c1e/repos/repo_url.go#L77
PR's are welcome!
Thanks for this feedback! This is a great usecase for https://github.com/ossf/scorecard/issues/462. We are still in the process of factoring out all github.com dependencies into RepoClient. Once we have this refactoring in place, it should be easy to use enterprise APIs instead of the regular one.