Skip to content

Instantly share code, notes, and snippets.

@pborreli
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pborreli/10560895 to your computer and use it in GitHub Desktop.
Save pborreli/10560895 to your computer and use it in GitHub Desktop.
Anyone know how I can run some analytics on GitHub repos? Looking to count # of PR’s merged/closed by me this month
SELECT
COUNT(payload_pull_request_number) as counter, payload_pull_request_merged as merged
FROM [githubarchive:github.timeline]
WHERE type="PullRequestEvent"
AND actor = 'parkr'
AND payload_action = 'closed'
AND repository_name = 'jekyll'
AND PARSE_UTC_USEC(created_at) >= PARSE_UTC_USEC('2014-04-01 00:00:00')
GROUP BY merged;
counter merged
5 false
16 true
@pborreli
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment