Commit 00821cea authored by Greg Messner's avatar Greg Messner
Browse files

Fixed createPipeline() (#230).

parent db5b6b53
...@@ -183,7 +183,7 @@ public class PipelineApi extends AbstractApi implements Constants { ...@@ -183,7 +183,7 @@ public class PipelineApi extends AbstractApi implements Constants {
/** /**
* Create a pipelines in a project. * Create a pipelines in a project.
* *
* POST /projects/:id/pipelines * POST /projects/:id/pipeline
* *
* @param projectId the project ID to create a pipeline in * @param projectId the project ID to create a pipeline in
* @param ref reference to commit * @param ref reference to commit
...@@ -192,7 +192,7 @@ public class PipelineApi extends AbstractApi implements Constants { ...@@ -192,7 +192,7 @@ public class PipelineApi extends AbstractApi implements Constants {
*/ */
public Pipeline createPipeline(int projectId, String ref) throws GitLabApiException { public Pipeline createPipeline(int projectId, String ref) throws GitLabApiException {
GitLabApiForm formData = new GitLabApiForm().withParam("ref", ref); GitLabApiForm formData = new GitLabApiForm().withParam("ref", ref);
Response response = post(Response.Status.CREATED, formData.asMap(), "projects", projectId, "pipelines"); Response response = post(Response.Status.CREATED, formData.asMap(), "projects", projectId, "pipeline");
return (response.readEntity(Pipeline.class)); return (response.readEntity(Pipeline.class));
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment