Hot Fix Stat API

This commit is contained in:
Sagi Dayan 2015-06-29 16:50:16 +03:00
parent f465c73c22
commit f514686442

View file

@ -31,20 +31,20 @@ def make_macro(stats, info):
macro['labels'].append('Commits') macro['labels'].append('Commits')
macro['labels'].append('Open Issues') macro['labels'].append('Open Issues')
for stat in stats: for stat in stats:
macro['data'][0] += stat['total'] macro['data'][0][0] += stat['total']
macro['data'].append(info['open_issues']) macro['data'].append(info['open_issues'])
return macro return macro
def make_micro(stats, info): # def make_micro(stats, info):
micro = {'labels': [], 'data': [[]], 'series': []} # micro = {'labels': [], 'data': [[]], 'series': []}
micro['labels'].append('Commits') # micro['labels'].append('Commits')
micro['labels'].append('Open Issues') # micro['labels'].append('Open Issues')
for stat in stats: # for stat in stats:
micro['data'][0][0] += stat['total'] # micro['data'][0][0] += stat['total']
micro['data'].append(info['open_issues']) # micro['data'].append(info['open_issues'])
#
return micro # return micro
def get_github_data(repo_url): def get_github_data(repo_url):
project_info = {'stats': {}} project_info = {'stats': {}}