Skip to content
This repository has been archived by the owner on Feb 1, 2021. It is now read-only.

Commit

Permalink
commits with status "building" should be on top
Browse files Browse the repository at this point in the history
  • Loading branch information
gharlan committed Jul 30, 2015
1 parent 429d29f commit c7a3bee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Sismo/Storage/PdoStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public function updateProject(Project $project)
}

// related commits
$stmt = $this->db->prepare('SELECT sha, author, date, build_date, message, status, output FROM `commit` WHERE slug = :slug ORDER BY build_date DESC LIMIT 100');
$stmt = $this->db->prepare('SELECT sha, author, date, build_date, message, status, output FROM `commit` WHERE slug = :slug ORDER BY `status` = "building" DESC, build_date DESC LIMIT 100');
$stmt->bindValue(':slug', $project->getSlug(), \PDO::PARAM_STR);

if (false === $stmt->execute()) {
Expand Down
2 changes: 1 addition & 1 deletion src/Sismo/Storage/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function updateProject(Project $project)
}

// related commits
$stmt = $this->db->prepare('SELECT sha, author, date, build_date, message, status, output FROM `commit` WHERE slug = :slug ORDER BY build_date DESC LIMIT 100');
$stmt = $this->db->prepare('SELECT sha, author, date, build_date, message, status, output FROM `commit` WHERE slug = :slug ORDER BY `status` = "building" DESC, build_date DESC LIMIT 100');
$stmt->bindValue(':slug', $project->getSlug(), SQLITE3_TEXT);

if (false === $results = $stmt->execute()) {
Expand Down

0 comments on commit c7a3bee

Please sign in to comment.