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
eace5a40
Commit
eace5a40
authored
May 03, 2020
by
Greg Messner
Browse files
Fixed spelling of cancelJob() (#561)
parent
8f3f40e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/JobApi.java
View file @
eace5a40
...
@@ -437,8 +437,24 @@ public class JobApi extends AbstractApi implements Constants {
...
@@ -437,8 +437,24 @@ public class JobApi extends AbstractApi implements Constants {
* @param jobId the ID to cancel job
* @param jobId the ID to cancel job
* @return job instance which just canceled
* @return job instance which just canceled
* @throws GitLabApiException if any exception occurs during execution
* @throws GitLabApiException if any exception occurs during execution
* @deprecated replaced by {@link #cancelJob(Object, Integer)}
*/
*/
@Deprecated
public
Job
cancleJob
(
Object
projectIdOrPath
,
Integer
jobId
)
throws
GitLabApiException
{
public
Job
cancleJob
(
Object
projectIdOrPath
,
Integer
jobId
)
throws
GitLabApiException
{
return
(
cancelJob
(
projectIdOrPath
,
jobId
));
}
/**
* Cancel specified job in a project.
*
* <pre><code>GitLab Endpoint: POST /projects/:id/jobs/:job_id/cancel</code></pre>
*
* @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path
* @param jobId the ID to cancel job
* @return job instance which just canceled
* @throws GitLabApiException if any exception occurs during execution
*/
public
Job
cancelJob
(
Object
projectIdOrPath
,
Integer
jobId
)
throws
GitLabApiException
{
GitLabApiForm
formData
=
null
;
GitLabApiForm
formData
=
null
;
Response
response
=
post
(
Response
.
Status
.
CREATED
,
formData
,
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"jobs"
,
jobId
,
"cancel"
);
Response
response
=
post
(
Response
.
Status
.
CREATED
,
formData
,
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"jobs"
,
jobId
,
"cancel"
);
return
(
response
.
readEntity
(
Job
.
class
));
return
(
response
.
readEntity
(
Job
.
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