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
484cf71e
Commit
484cf71e
authored
Jun 09, 2017
by
Greg Messner
Browse files
Cleaned up Javadocs.
parent
5efce766
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/PipelineApi.java
View file @
484cf71e
...
@@ -12,9 +12,9 @@ import org.gitlab4j.api.models.Pipeline;
...
@@ -12,9 +12,9 @@ import org.gitlab4j.api.models.Pipeline;
*/
*/
public
class
PipelineApi
extends
AbstractApi
{
public
class
PipelineApi
extends
AbstractApi
{
public
PipelineApi
(
GitLabApi
gitLabApi
)
{
public
PipelineApi
(
GitLabApi
gitLabApi
)
{
super
(
gitLabApi
);
super
(
gitLabApi
);
}
}
/**
/**
* Get a list of pipelines in a project.
* Get a list of pipelines in a project.
...
@@ -30,26 +30,26 @@ public class PipelineApi extends AbstractApi {
...
@@ -30,26 +30,26 @@ public class PipelineApi extends AbstractApi {
return
(
response
.
readEntity
(
new
GenericType
<
List
<
Pipeline
>>()
{
return
(
response
.
readEntity
(
new
GenericType
<
List
<
Pipeline
>>()
{
}));
}));
}
}
/**
/**
* Get a list of pipelines in a project.
* Get a list of pipelines in a project.
*
*
* GET /projects/:id/pipelines
* GET /projects/:id/pipelines
*
*
* @param projectId the project ID to get the list of pipelines for
* @param projectId the project ID to get the list of pipelines for
* @param scope
* @param scope
the scope of pipelines, one of: running, pending, finished, branches, tags
* @param status
* @param status
the status of pipelines, one of: running, pending, success, failed, canceled, skipped
* @param ref
* @param ref
the ref of pipelines
* @param yamlErrors
* @param yamlErrors
returns pipelines with invalid configurations
* @param name
* @param name
the name of the user who triggered pipelines
* @param username
* @param username
the username of the user who triggered pipelines
* @param orderBy
* @param orderBy
order pipelines by id, status, ref, or user_id (default: id)
* @param sort
* @param sort
sort pipelines in asc or desc order (default: desc)
* @return a list containing the pipelines for the specified project ID
* @return a list containing the pipelines for the specified project ID
* @throws GitLabApiException if any exception occurs during execution
* @throws GitLabApiException if any exception occurs during execution
*/
*/
public
List
<
Pipeline
>
getPipelines
(
int
projectId
,
String
scope
,
String
status
,
String
ref
,
public
List
<
Pipeline
>
getPipelines
(
int
projectId
,
String
scope
,
String
status
,
String
ref
,
boolean
yamlErrors
,
boolean
yamlErrors
,
String
name
,
String
username
,
String
orderBy
,
String
sort
)
throws
GitLabApiException
{
String
name
,
String
username
,
String
orderBy
,
String
sort
)
throws
GitLabApiException
{
GitLabApiForm
formData
=
new
GitLabApiForm
()
GitLabApiForm
formData
=
new
GitLabApiForm
()
.
withParam
(
"scope"
,
scope
)
.
withParam
(
"scope"
,
scope
)
.
withParam
(
"status"
,
status
)
.
withParam
(
"status"
,
status
)
...
@@ -61,8 +61,8 @@ public class PipelineApi extends AbstractApi {
...
@@ -61,8 +61,8 @@ public class PipelineApi extends AbstractApi {
.
withParam
(
"sort"
,
sort
);
.
withParam
(
"sort"
,
sort
);
Response
response
=
get
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
"projects"
,
projectId
,
"pipelines"
);
Response
response
=
get
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
"projects"
,
projectId
,
"pipelines"
);
return
(
response
.
readEntity
(
new
GenericType
<
List
<
Pipeline
>>()
{
return
(
response
.
readEntity
(
new
GenericType
<
List
<
Pipeline
>>()
{
}));
}));
}
}
/**
/**
...
@@ -76,28 +76,27 @@ public class PipelineApi extends AbstractApi {
...
@@ -76,28 +76,27 @@ public class PipelineApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs during execution
* @throws GitLabApiException if any exception occurs during execution
*/
*/
public
Pipeline
getPipeline
(
int
projectId
,
int
pipelineId
)
throws
GitLabApiException
{
public
Pipeline
getPipeline
(
int
projectId
,
int
pipelineId
)
throws
GitLabApiException
{
Response
response
=
get
(
Response
.
Status
.
OK
,
null
,
"projects"
,
projectId
,
"pipelines"
,
pipelineId
);
Response
response
=
get
(
Response
.
Status
.
OK
,
null
,
"projects"
,
projectId
,
"pipelines"
,
pipelineId
);
return
(
response
.
readEntity
(
Pipeline
.
class
));
return
(
response
.
readEntity
(
Pipeline
.
class
));
}
}
/**
/**
* Create a pipelines in a project.
* Create a pipelines in a project.
*
*
* POST /projects/:id/pipelines
* POST /projects/:id/pipelines
*
*
* @param projectId the project ID to create a pipeline in
* @param projectId the project ID to create a pipeline in
* @param ref
* @param ref
reference to commit
* @return a Pipeline instance with the newly created pipeline info
* @return a Pipeline instance with the newly created pipeline info
* @throws GitLabApiException if any exception occurs during execution
* @throws GitLabApiException if any exception occurs during execution
*/
*/
public
Pipeline
createPipeline
(
int
projectId
,
String
ref
)
throws
GitLabApiException
{
public
Pipeline
createPipeline
(
int
projectId
,
String
ref
)
throws
GitLabApiException
{
GitLabApiForm
formData
=
new
GitLabApiForm
()
GitLabApiForm
formData
=
new
GitLabApiForm
().
withParam
(
"ref"
,
ref
);
.
withParam
(
"ref"
,
ref
);
Response
response
=
post
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
"projects"
,
projectId
,
"pipelines"
);
Response
response
=
post
(
Response
.
Status
.
OK
,
formData
.
asMap
(),
"projects"
,
projectId
,
"pipelines"
);
return
(
response
.
readEntity
(
Pipeline
.
class
));
return
(
response
.
readEntity
(
Pipeline
.
class
));
}
}
/**
/**
* Retry a job in specified pipelines in a project.
* Retry a job in specified pipelines in a project.
*
*
...
@@ -109,11 +108,11 @@ public class PipelineApi extends AbstractApi {
...
@@ -109,11 +108,11 @@ public class PipelineApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs during execution
* @throws GitLabApiException if any exception occurs during execution
*/
*/
public
Pipeline
retryPipelineJob
(
int
projectId
,
int
pipelineId
)
throws
GitLabApiException
{
public
Pipeline
retryPipelineJob
(
int
projectId
,
int
pipelineId
)
throws
GitLabApiException
{
GitLabApiForm
formData
=
null
;
GitLabApiForm
formData
=
null
;
Response
response
=
post
(
Response
.
Status
.
OK
,
formData
,
"projects"
,
projectId
,
"pipelines"
,
pipelineId
,
"retry"
);
Response
response
=
post
(
Response
.
Status
.
OK
,
formData
,
"projects"
,
projectId
,
"pipelines"
,
pipelineId
,
"retry"
);
return
(
response
.
readEntity
(
Pipeline
.
class
));
return
(
response
.
readEntity
(
Pipeline
.
class
));
}
}
/**
/**
* Cancel jobs of specified pipelines in a project.
* Cancel jobs of specified pipelines in a project.
*
*
...
@@ -125,8 +124,8 @@ public class PipelineApi extends AbstractApi {
...
@@ -125,8 +124,8 @@ public class PipelineApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs during execution
* @throws GitLabApiException if any exception occurs during execution
*/
*/
public
Pipeline
cancelPipelineJobs
(
int
projectId
,
int
pipelineId
)
throws
GitLabApiException
{
public
Pipeline
cancelPipelineJobs
(
int
projectId
,
int
pipelineId
)
throws
GitLabApiException
{
GitLabApiForm
formData
=
null
;
GitLabApiForm
formData
=
null
;
Response
response
=
post
(
Response
.
Status
.
OK
,
formData
,
"projects"
,
projectId
,
"pipelines"
,
pipelineId
,
"cancel"
);
Response
response
=
post
(
Response
.
Status
.
OK
,
formData
,
"projects"
,
projectId
,
"pipelines"
,
pipelineId
,
"cancel"
);
return
(
response
.
readEntity
(
Pipeline
.
class
));
return
(
response
.
readEntity
(
Pipeline
.
class
));
}
}
}
}
src/main/java/org/gitlab4j/api/ProjectApi.java
View file @
484cf71e
...
@@ -783,6 +783,7 @@ public class ProjectApi extends AbstractApi {
...
@@ -783,6 +783,7 @@ public class ProjectApi extends AbstractApi {
*
*
* GET /projects/:id/issues
* GET /projects/:id/issues
*
*
* @param projectId the project ID to get the issues for
* @param page the page to get
* @param page the page to get
* @param perPage the number of issues per page
* @param perPage the number of issues per page
* @return the list of issues in the specified range
* @return the list of issues in the specified range
...
...
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