From 55426dbba71174047bbffd4a9919207b7d530ce6 Mon Sep 17 00:00:00 2001 From: Arne von Appen Date: Mon, 9 Oct 2017 12:14:34 +0200 Subject: [PATCH 1/2] Update Projects.php invalid link for pipeline creation --- lib/Gitlab/Api/Projects.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Gitlab/Api/Projects.php b/lib/Gitlab/Api/Projects.php index 710a3e6a1..489ddb666 100644 --- a/lib/Gitlab/Api/Projects.php +++ b/lib/Gitlab/Api/Projects.php @@ -214,7 +214,7 @@ public function pipeline($project_id, $pipeline_id) */ public function createPipeline($project_id, $commit_ref) { - return $this->post($this->getProjectPath($project_id, 'pipelines'), array( + return $this->post($this->getProjectPath($project_id, 'pipeline'), array( 'ref' => $commit_ref)); } From 450172875d461916233eba0d321393484a254d8d Mon Sep 17 00:00:00 2001 From: Arne von Appen Date: Mon, 9 Oct 2017 12:17:50 +0200 Subject: [PATCH 2/2] Update ProjectsTest.php --- test/Gitlab/Tests/Api/ProjectsTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Gitlab/Tests/Api/ProjectsTest.php b/test/Gitlab/Tests/Api/ProjectsTest.php index 07f0f9f3d..599337328 100644 --- a/test/Gitlab/Tests/Api/ProjectsTest.php +++ b/test/Gitlab/Tests/Api/ProjectsTest.php @@ -261,7 +261,7 @@ public function shouldCreatePipeline() $api = $this->getApiMock(); $api->expects($this->once()) ->method('post') - ->with('projects/1/pipelines', array('ref' => 'test-pipeline')) + ->with('projects/1/pipeline', array('ref' => 'test-pipeline')) ->will($this->returnValue($expectedArray)) ;