Skip to content

Commit c00d2f3

Browse files
committed
show the result of the last actual run in a test.svg badge
1 parent 65eb271 commit c00d2f3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/api/handlers/project.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,16 @@ def get(self, project_id):
198198
FROM build b
199199
INNER JOIN job j
200200
ON b.id = j.build_id
201+
AND j.state in ('finished', 'unstable')
201202
AND b.project_id = %s
202203
AND j.project_id = %s
203-
ORDER BY j.created_at DESC
204+
AND j.name LIKE %s
205+
ORDER BY j.end_date DESC
204206
LIMIT 1
205207
)
206208
AND j.name LIKE %s
207209
)
208-
''', [project_id, project_id, project_id, project_id, job_name])
210+
''', [project_id, project_id, project_id, project_id, job_name, job_name])
209211

210212
total = int(r['success']) + int(r['failure']) + int(r['error'])
211213
status = '%s / %s' % (r['success'], total)

0 commit comments

Comments
 (0)