Add new function to cover the svn project web hook and create a build.
This commit is contained in:
parent
8113d302ed
commit
d2ba729ded
|
@ -400,6 +400,27 @@ class WebhookController extends Controller
|
|||
return ['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
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
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.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue