Skip to content

Commit

Permalink
fix: get commitDate instead of authorDate
Browse files Browse the repository at this point in the history
  • Loading branch information
VladCroitoru committed Nov 25, 2021
1 parent d64f3a6 commit ff8a901
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions parse_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_year(path: str) -> str:
if len(last_commit) == 0:
return ""
else:
return last_commit[0]['commit']['author']['date'][:4]
return last_commit[0]['commit']['committer']['date'][:4]

def get_smells(path: str) -> list:
file_path = f"{path}.hadolint.json"
Expand All @@ -59,7 +59,8 @@ def get_smells(path: str) -> list:
temp['code'] = smell['code']
temp['level'] = smell['level']
temp['type'] = smell['code'][:2]
smells.append(temp)
if temp['level'] in ['error', 'warning']:
smells.append(temp)

return smells

Expand Down

0 comments on commit ff8a901

Please sign in to comment.