Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
4dabe711
Commit
4dabe711
authored
Mar 03, 2019
by
Greg Messner
Browse files
Fixed disableRunner() (#315).
parent
aeaee888
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/RunnersApi.java
View file @
4dabe711
...
@@ -457,8 +457,7 @@ public class RunnersApi extends AbstractApi {
...
@@ -457,8 +457,7 @@ public class RunnersApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs
* @throws GitLabApiException if any exception occurs
*/
*/
public
Runner
enableRunner
(
Object
projectIdOrPath
,
Integer
runnerId
)
throws
GitLabApiException
{
public
Runner
enableRunner
(
Object
projectIdOrPath
,
Integer
runnerId
)
throws
GitLabApiException
{
GitLabApiForm
formData
=
new
GitLabApiForm
()
GitLabApiForm
formData
=
new
GitLabApiForm
().
withParam
(
"runner_id"
,
runnerId
,
true
);
.
withParam
(
"runner_id"
,
runnerId
,
true
);
Response
response
=
post
(
Response
.
Status
.
CREATED
,
formData
.
asMap
(),
Response
response
=
post
(
Response
.
Status
.
CREATED
,
formData
.
asMap
(),
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"runners"
);
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"runners"
);
return
(
response
.
readEntity
(
Runner
.
class
));
return
(
response
.
readEntity
(
Runner
.
class
));
...
@@ -476,9 +475,8 @@ public class RunnersApi extends AbstractApi {
...
@@ -476,9 +475,8 @@ public class RunnersApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs
* @throws GitLabApiException if any exception occurs
*/
*/
public
Runner
disableRunner
(
Object
projectIdOrPath
,
Integer
runnerId
)
throws
GitLabApiException
{
public
Runner
disableRunner
(
Object
projectIdOrPath
,
Integer
runnerId
)
throws
GitLabApiException
{
GitLabApiForm
formData
=
new
GitLabApiForm
().
withParam
(
"runner_id"
,
runnerId
,
true
);
Response
response
=
delete
(
Response
.
Status
.
OK
,
null
,
Response
response
=
delete
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"runners"
,
runnerId
);
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"runners"
);
return
(
response
.
readEntity
(
Runner
.
class
));
return
(
response
.
readEntity
(
Runner
.
class
));
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment