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
6eb8bd73
Commit
6eb8bd73
authored
Dec 21, 2018
by
Greg Messner
Browse files
issueIid is now used for all methods and made title optional for updateIssue() (#285).
parent
e0a866b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/IssuesApi.java
View file @
6eb8bd73
...
@@ -286,12 +286,13 @@ public class IssuesApi extends AbstractApi implements Constants {
...
@@ -286,12 +286,13 @@ public class IssuesApi extends AbstractApi implements Constants {
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid</code></pre>
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid</code></pre>
*
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param issue
I
d the internal ID of a project's issue
* @param issue
i
d the internal ID of a project's issue
* @return the specified Issue instance
* @return the specified Issue instance
* @throws GitLabApiException if any exception occurs
* @throws GitLabApiException if any exception occurs
*/
*/
public
Issue
getIssue
(
Object
projectIdOrPath
,
Integer
issueId
)
throws
GitLabApiException
{
public
Issue
getIssue
(
Object
projectIdOrPath
,
Integer
issueIid
)
throws
GitLabApiException
{
Response
response
=
get
(
Response
.
Status
.
OK
,
getDefaultPerPageParam
(),
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"issues"
,
issueId
);
Response
response
=
get
(
Response
.
Status
.
OK
,
getDefaultPerPageParam
(),
"projects"
,
getProjectIdOrPath
(
projectIdOrPath
),
"issues"
,
issueIid
);
return
(
response
.
readEntity
(
Issue
.
class
));
return
(
response
.
readEntity
(
Issue
.
class
));
}
}
...
@@ -301,12 +302,12 @@ public class IssuesApi extends AbstractApi implements Constants {
...
@@ -301,12 +302,12 @@ public class IssuesApi extends AbstractApi implements Constants {
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid</code></pre>
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid</code></pre>
*
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
* @param issueId the internal ID of a project's issue
* @param issueI
i
d the internal ID of a project's issue
* @return the specified Issue as an Optional instance
* @return the specified Issue as an Optional instance
*/
*/
public
Optional
<
Issue
>
getOptionalIssue
(
Object
projectIdOrPath
,
Integer
issueId
)
{
public
Optional
<
Issue
>
getOptionalIssue
(
Object
projectIdOrPath
,
Integer
issueI
i
d
)
{
try
{
try
{
return
(
Optional
.
ofNullable
(
getIssue
(
projectIdOrPath
,
issueId
)));
return
(
Optional
.
ofNullable
(
getIssue
(
projectIdOrPath
,
issueI
i
d
)));
}
catch
(
GitLabApiException
glae
)
{
}
catch
(
GitLabApiException
glae
)
{
return
(
GitLabApi
.
createOptionalFromException
(
glae
));
return
(
GitLabApi
.
createOptionalFromException
(
glae
));
}
}
...
@@ -393,7 +394,7 @@ public class IssuesApi extends AbstractApi implements Constants {
...
@@ -393,7 +394,7 @@ public class IssuesApi extends AbstractApi implements Constants {
* <pre><code>GitLab Endpoint: PUT /projects/:id/issues/:issue_iid</code></pre>
* <pre><code>GitLab Endpoint: PUT /projects/:id/issues/:issue_iid</code></pre>
*
*
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
* @param issueIid the issue IID to update,
required
* @param issueIid the issue IID to update,
optional
* @param title the title of an issue, optional
* @param title the title of an issue, optional
* @param description the description of an issue, optional
* @param description the description of an issue, optional
* @param confidential set the issue to be confidential, default is false, optional
* @param confidential set the issue to be confidential, default is false, optional
...
@@ -414,7 +415,7 @@ public class IssuesApi extends AbstractApi implements Constants {
...
@@ -414,7 +415,7 @@ public class IssuesApi extends AbstractApi implements Constants {
}
}
GitLabApiForm
formData
=
new
GitLabApiForm
()
GitLabApiForm
formData
=
new
GitLabApiForm
()
.
withParam
(
"title"
,
title
,
true
)
.
withParam
(
"title"
,
title
)
.
withParam
(
"description"
,
description
)
.
withParam
(
"description"
,
description
)
.
withParam
(
"confidential"
,
confidential
)
.
withParam
(
"confidential"
,
confidential
)
.
withParam
(
"assignee_ids"
,
assigneeIds
)
.
withParam
(
"assignee_ids"
,
assigneeIds
)
...
...
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