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
0c4c5c5d
Unverified
Commit
0c4c5c5d
authored
Nov 06, 2023
by
Neil Wang
Committed by
GitHub
Nov 06, 2023
Browse files
Add reopenIssue api in IssuesApi (#1043)
parent
4841eceb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/IssuesApi.java
View file @
0c4c5c5d
...
...
@@ -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.
*
...
...
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