Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
add Github_token to extend API rate limit (auth users limit is higher)
Browse files Browse the repository at this point in the history
  • Loading branch information
AcckiyGerman committed Apr 16, 2018
1 parent 6083f09 commit 549a85b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions data/issues.csv
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,5 @@ date,Critical,Major,Minor,Trivial,NEW FEATURE,closed
2018-04-06,0,5,7,12,16,0
2018-04-07,0,5,7,11,16,0
2018-04-08,0,5,7,11,16,0
2018-04-09,0,5,7,2,16,0
2018-04-09,0,5,7,11,16,0
2018-04-11,0,3,10,11,16,0
2018-04-12,0,2,2,2,2,0
4 changes: 3 additions & 1 deletion process.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# github API docs https://developer.github.com/v3/issues/#list-issues-for-a-repository
API = "https://api.github.com/repos/datahq/datahub-qa/issues"
# script will get and count issues with the given labels:
GITHUB_TOKEN = os.environ.get('GITHUB_TOKEN')
# script will get and count issues with the given labels:
labels_to_track = [
'Severity: Critical',
'Severity: Major',
Expand All @@ -28,7 +30,7 @@

def count_open_issues(label):
print('get "%s" issues' % label, end=" ... ")
r = requests.get(API, params={'labels': label})
r = requests.get(API, params={'labels': label, 'access_token': GITHUB_TOKEN})
issues = r.json()
print(len(issues))
return len(issues)
Expand Down

0 comments on commit 549a85b

Please sign in to comment.