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

Fix sort order in output of scm-source #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pierone/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def scm_source(config, team, artifact, tag, url, output):
row['created_time'] = parse_time(''.join([d['created'] for d in matching_tag]))
rows.append(row)

rows.sort(key=lambda row: (row['tag'], row.get('created_time')))
rows.sort(key=lambda row: (row.get('created_time'), row['tag']))
with OutputFormat(output):
print_table(['tag', 'author', 'url', 'revision', 'status', 'created_time', 'created_by'], rows,
titles={'tag': 'Tag', 'created_by': 'By', 'created_time': 'Created',
Expand Down