Skip to content

Commit 6eb8bd7

Browse files
committed
issueIid is now used for all methods and made title optional for updateIssue() (#285).
1 parent e0a866b commit 6eb8bd7

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

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

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,13 @@ public Stream<Issue> getIssuesStream(IssueFilter filter) throws GitLabApiExcepti
286286
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid</code></pre>
287287
*
288288
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
289-
* @param issueId the internal ID of a project's issue
289+
* @param issueid the internal ID of a project's issue
290290
* @return the specified Issue instance
291291
* @throws GitLabApiException if any exception occurs
292292
*/
293-
public Issue getIssue(Object projectIdOrPath, Integer issueId) throws GitLabApiException {
294-
Response response = get(Response.Status.OK, getDefaultPerPageParam(), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueId);
293+
public Issue getIssue(Object projectIdOrPath, Integer issueIid) throws GitLabApiException {
294+
Response response = get(Response.Status.OK, getDefaultPerPageParam(),
295+
"projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid);
295296
return (response.readEntity(Issue.class));
296297
}
297298

@@ -301,12 +302,12 @@ public Issue getIssue(Object projectIdOrPath, Integer issueId) throws GitLabApiE
301302
* <pre><code>GitLab Endpoint: GET /projects/:id/issues/:issue_iid</code></pre>
302303
*
303304
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
304-
* @param issueId the internal ID of a project's issue
305+
* @param issueIid the internal ID of a project's issue
305306
* @return the specified Issue as an Optional instance
306307
*/
307-
public Optional<Issue> getOptionalIssue(Object projectIdOrPath, Integer issueId) {
308+
public Optional<Issue> getOptionalIssue(Object projectIdOrPath, Integer issueIid) {
308309
try {
309-
return (Optional.ofNullable(getIssue(projectIdOrPath, issueId)));
310+
return (Optional.ofNullable(getIssue(projectIdOrPath, issueIid)));
310311
} catch (GitLabApiException glae) {
311312
return (GitLabApi.createOptionalFromException(glae));
312313
}
@@ -393,7 +394,7 @@ public Issue closeIssue(Object projectIdOrPath, Integer issueIid) throws GitLabA
393394
* <pre><code>GitLab Endpoint: PUT /projects/:id/issues/:issue_iid</code></pre>
394395
*
395396
* @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
396-
* @param issueIid the issue IID to update, required
397+
* @param issueIid the issue IID to update, optional
397398
* @param title the title of an issue, optional
398399
* @param description the description of an issue, optional
399400
* @param confidential set the issue to be confidential, default is false, optional
@@ -414,7 +415,7 @@ public Issue updateIssue(Object projectIdOrPath, Integer issueIid, String title,
414415
}
415416

416417
GitLabApiForm formData = new GitLabApiForm()
417-
.withParam("title", title, true)
418+
.withParam("title", title)
418419
.withParam("description", description)
419420
.withParam("confidential", confidential)
420421
.withParam("assignee_ids", assigneeIds)

0 commit comments

Comments
 (0)