Fixed contribution summary block
This patch changes records from dicts into namedtuples (remained from https://review.openstack.org/#/c/103574/) Change-Id: I117976f2b8bb3af22a90a477dbacc5969fb5b20f
This commit is contained in:
committed by
Ilya Shakhat
parent
51530eae4e
commit
0b5203b1ee
@@ -146,24 +146,24 @@ def get_contribution_summary(records):
|
|||||||
resolved_bug_count = 0
|
resolved_bug_count = 0
|
||||||
|
|
||||||
for record in records:
|
for record in records:
|
||||||
record_type = record['record_type']
|
record_type = record.record_type
|
||||||
if record_type == 'commit':
|
if record_type == 'commit':
|
||||||
commit_count += 1
|
commit_count += 1
|
||||||
loc += record['loc']
|
loc += record.loc
|
||||||
elif record['record_type'] == 'mark':
|
elif record_type == 'mark':
|
||||||
if record['type'] == 'Workflow' and record['value'] == 1:
|
if record.type == 'Workflow' and record.value == 1:
|
||||||
marks['A'] += 1
|
marks['A'] += 1
|
||||||
else:
|
else:
|
||||||
marks[record['value']] += 1
|
marks[record.value] += 1
|
||||||
elif record['record_type'] == 'email':
|
elif record_type == 'email':
|
||||||
email_count += 1
|
email_count += 1
|
||||||
elif record['record_type'] == 'bpd':
|
elif record_type == 'bpd':
|
||||||
drafted_blueprint_count += 1
|
drafted_blueprint_count += 1
|
||||||
elif record['record_type'] == 'bpc':
|
elif record_type == 'bpc':
|
||||||
completed_blueprint_count += 1
|
completed_blueprint_count += 1
|
||||||
elif record['record_type'] == 'bugf':
|
elif record_type == 'bugf':
|
||||||
filed_bug_count += 1
|
filed_bug_count += 1
|
||||||
elif record['record_type'] == 'bugr':
|
elif record_type == 'bugr':
|
||||||
resolved_bug_count += 1
|
resolved_bug_count += 1
|
||||||
|
|
||||||
result = {
|
result = {
|
||||||
|
|||||||
Reference in New Issue
Block a user