Refactored push and tag webhooks for Github (Fixes +++).

This commit is contained in:
Dmitry Khomutov 2017-04-20 21:14:48 +07:00
commit f26f000bb4
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9
2 changed files with 4 additions and 6 deletions

View file

@ -180,18 +180,16 @@ class BuildStore extends Store
*
* @param integer $projectId
* @param string $commitId
* @param string $branch
*
* @return array
*/
public function getByProjectAndCommit($projectId, $commitId, $branch)
public function getByProjectAndCommit($projectId, $commitId)
{
$query = 'SELECT * FROM {{build}} WHERE {{project_id}} = :project_id AND {{commit_id}} = :commit_id AND {{branch}} = :branch';
$query = 'SELECT * FROM {{build}} WHERE {{project_id}} = :project_id AND {{commit_id}} = :commit_id';
$stmt = Database::getConnection('read')->prepareCommon($query);
$stmt->bindValue(':project_id', $projectId);
$stmt->bindValue(':commit_id', $commitId);
$stmt->bindValue(':branch', $branch);
if ($stmt->execute()) {
$res = $stmt->fetchAll(\PDO::FETCH_ASSOC);