Last active
May 15, 2022 22:23
-
-
Save knishioka/1022cd8f81660972f1b701439aee8080 to your computer and use it in GitHub Desktop.
Count merged pull requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
token = '' | |
org = '' | |
author = '' | |
start_date = '2019-10-01' | |
end_date = '2019-12-31' | |
query = f'org:{org}+author:{author}+merged:{start_date}..{end_date}' | |
end_point = 'https://api.github.com/search/issues' | |
requests.get(f'{end_point}?q={query}&access_token={token}').json()['total_count'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hey there, thanks for that!
Just an update, Github doesn't support tokens via URL anymore, it should be set through HEADERS instead as in: https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/
Hope that helps :)