API_Github Conecctor HOT fix - weekly

This commit is contained in:
Sagi Dayan 2015-06-29 21:03:04 +03:00
parent 15172f9687
commit 4b8a67d208

View file

@ -24,7 +24,10 @@ def get_repo_issues(repo_url):
def get_repo_weekly_commits(repo_url): def get_repo_weekly_commits(repo_url):
url = 'https://api.github.com/repos/' + repo_url + '/stats/participation' + '?client_id=' + githubKeys.getId() + '&client_secret=' + githubKeys.getSecret() url = 'https://api.github.com/repos/' + repo_url + '/stats/participation' + '?client_id=' + githubKeys.getId() + '&client_secret=' + githubKeys.getSecret()
req = requests.get(url) req = requests.get(url)
try:
return req.json()['all'] return req.json()['all']
except:
return []
def make_macro(stats, info): def make_macro(stats, info):
macro = {'labels': [], 'data': [[0]]} macro = {'labels': [], 'data': [[0]]}