I have a lot of thoughts on how to do it, but I think others are already working on it.
funnily enough, I had a startup a few years ago in Boston mining git data and selling it to google, hubspot, TripAdvisor, etsy, etc
fwiw I hated working with them and shut down the business -- fuck tech oligopolies