Commit 1cbf1c66 authored by Jeremie Bresson's avatar Jeremie Bresson
Browse files

Merge remote-tracking branch 'origin/main' into 6.x

parents d84eab7f 0c4c5c5d
...@@ -489,6 +489,27 @@ public class IssuesApi extends AbstractApi implements Constants { ...@@ -489,6 +489,27 @@ public class IssuesApi extends AbstractApi implements Constants {
return (response.readEntity(Issue.class)); 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. * 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