Skip to content

Commit 4dabe71

Browse files
committed
Fixed disableRunner() (#315).
1 parent aeaee88 commit 4dabe71

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/main/java/org/gitlab4j/api/RunnersApi.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,7 @@ public Pager<Runner> getProjectRunners(Object projectIdOrPath, int itemsPerPage)
457457
* @throws GitLabApiException if any exception occurs
458458
*/
459459
public Runner enableRunner(Object projectIdOrPath, Integer runnerId) throws GitLabApiException {
460-
GitLabApiForm formData = new GitLabApiForm()
461-
.withParam("runner_id", runnerId, true);
460+
GitLabApiForm formData = new GitLabApiForm().withParam("runner_id", runnerId, true);
462461
Response response = post(Response.Status.CREATED, formData.asMap(),
463462
"projects", getProjectIdOrPath(projectIdOrPath), "runners");
464463
return (response.readEntity(Runner.class));
@@ -476,9 +475,8 @@ public Runner enableRunner(Object projectIdOrPath, Integer runnerId) throws GitL
476475
* @throws GitLabApiException if any exception occurs
477476
*/
478477
public Runner disableRunner(Object projectIdOrPath, Integer runnerId) throws GitLabApiException {
479-
GitLabApiForm formData = new GitLabApiForm().withParam("runner_id", runnerId, true);
480-
Response response = delete(Response.Status.OK, formData.asMap(),
481-
"projects", getProjectIdOrPath(projectIdOrPath), "runners");
478+
Response response = delete(Response.Status.OK, null,
479+
"projects", getProjectIdOrPath(projectIdOrPath), "runners", runnerId);
482480
return (response.readEntity(Runner.class));
483481
}
484482

0 commit comments

Comments
 (0)