Skip to content

Commit

Permalink
Adding limit for last badge
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneTR committed Dec 19, 2024
1 parent 13e0473 commit a7b7615
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/eco_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ async def get_ci_badge_get(repo: str, branch: str, workflow:str, mode: str = 'la
query = f"""{query}
GROUP BY run_id
ORDER BY MAX(created_at) DESC
LIMIT 1
"""
elif mode == 'totals' and duration_days:
query = f"{query} AND created_at > NOW() - make_interval(days => %s)"
Expand Down

0 comments on commit a7b7615

Please sign in to comment.