Unverified Commit 0c4c5c5d authored by Neil Wang's avatar Neil Wang Committed by GitHub
Browse files

Add reopenIssue api in IssuesApi (#1043)

parent 4841eceb
......@@ -488,6 +488,27 @@ public class IssuesApi extends AbstractApi implements Constants {
return (response.readEntity(Issue.class));
}
/**
* Reopens an existing project issue.
*
* <pre><code>GitLab Endpoint: PUT /projects/:id/issues/:issue_iid</code></pre>
*
* @param projectIdOrPath the project in the form of an Long(ID), String(path), or Project instance, required
* @param issueIid the issue IID to update, required
* @return an instance of the updated Issue
* @throws GitLabApiException if any exception occurs
*/
public Issue reopenIssue(Object projectIdOrPath, Long issueIid) throws GitLabApiException {
if (issueIid == null) {
throw new RuntimeException("issue IID cannot be null");
}
GitLabApiForm formData = new GitLabApiForm().withParam("state_event", StateEvent.REOPEN);
Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "issues", issueIid);
return (response.readEntity(Issue.class));
}
/**
* Updates an existing project issue. This call can also be used to mark an issue as closed.
*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment