Github repos sort by stars

Where I get these data?

Use below query on Google public github archive dataset:

SELECT repo.name
  , MAX(CAST(JSON_EXTRACT_SCALAR(payload, '$.pull_request.base.repo.stargazers_count')AS INT64)) stars
FROM `githubarchive.month.201912`  
WHERE JSON_EXTRACT_SCALAR(payload, '$.pull_request.base.repo.language') = 'Ruby'
AND type='PullRequestEvent'
GROUP by repo.name
ORDER BY stars DESC
References