Skip to content

Commit

Permalink
* Add new function to cover the svn project web hook and create a bui…
Browse files Browse the repository at this point in the history
…ld. (#1242)
  • Loading branch information
slevesque authored and Dan Cryer committed Dec 14, 2016
1 parent d43e82c commit c3d9a3f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions PHPCI/Controller/WebhookController.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,24 @@ public function gitlab($projectId)
return array('status' => 'ignored', 'message' => 'Unusable payload.');
}


/**
* Called by POSTing to /webhook/svn/<project_id>?branch=<branch>&commit=<commit>
*
* @author Sylvain Lévesque <slevesque@gezere.com>
* @param string $projectId
*/
public function svn($projectId)
{
$project = $this->fetchProject($projectId, 'svn');
$branch = $this->getParam('branch', $project->getBranch());
$commit = $this->getParam('commit');
$commitMessage = $this->getParam('message');
$committer = $this->getParam('committer');

return $this->createBuild($project, $commit, $branch, $committer, $commitMessage);
}

/**
* Wrapper for creating a new build.
*
Expand Down

0 comments on commit c3d9a3f

Please sign in to comment.