Skip to content

Commit

Permalink
fix: releases ordering has changed in source JSON. Now access first i…
Browse files Browse the repository at this point in the history
…tem rather than last. Make the setting of publihsed variable be gated by the same if logic as version (was previously duplicated for no real reason)
  • Loading branch information
awgymer committed Oct 16, 2023
1 parent ed313b1 commit 0de14c5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nf_core/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,10 @@ def sort_pulled_date(wf):
for wf in filtered_workflows:
wf_name = f"[bold][link=https://nf-co.re/{wf.name}]{wf.name}[/link]"
version = "[yellow]dev"
published = "[dim]-"
if len(wf.releases) > 0:
version = f"[blue]{wf.releases[-1]['tag_name']}"
published = wf.releases[-1]["published_at_pretty"] if len(wf.releases) > 0 else "[dim]-"
version = f"[blue]{wf.releases[0]['tag_name']}"
published = wf.releases[0]["published_at_pretty"]
pulled = wf.local_wf.last_pull_pretty if wf.local_wf is not None else "[dim]-"
if wf.local_wf is not None:
revision = ""
Expand Down

0 comments on commit 0de14c5

Please sign in to comment.