Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
java-gitlab-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
沈俊林
java-gitlab-api
Commits
9f4577da
Commit
9f4577da
authored
Nov 03, 2015
by
Tim Olshansky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #84 from wikiwi/update-mr-note
Add Method to Update Merge Request Notes
parents
2ced002f
e9fc80e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
GitlabAPI.java
src/main/java/org/gitlab/api/GitlabAPI.java
+19
-0
No files found.
src/main/java/org/gitlab/api/GitlabAPI.java
View file @
9f4577da
...
@@ -824,6 +824,25 @@ public class GitlabAPI {
...
@@ -824,6 +824,25 @@ public class GitlabAPI {
return
Arrays
.
asList
(
tree
);
return
Arrays
.
asList
(
tree
);
}
}
/**
* Update a Merge Request Note
*
* @param mergeRequest The merge request
* @param noteId The id of the note
* @param body The content of the note
* @return the Gitlab Note
* @throws IOException on gitlab api call error
*/
public
GitlabNote
updateNote
(
GitlabMergeRequest
mergeRequest
,
Integer
noteId
,
String
body
)
throws
IOException
{
Query
query
=
new
Query
()
.
appendIf
(
"body"
,
body
);
String
tailUrl
=
GitlabProject
.
URL
+
"/"
+
mergeRequest
.
getProjectId
()
+
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getId
()
+
GitlabNote
.
URL
+
"/"
+
noteId
+
query
.
toString
();
return
retrieve
().
method
(
"PUT"
).
to
(
tailUrl
,
GitlabNote
.
class
);
}
public
GitlabNote
createNote
(
GitlabMergeRequest
mergeRequest
,
String
body
)
throws
IOException
{
public
GitlabNote
createNote
(
GitlabMergeRequest
mergeRequest
,
String
body
)
throws
IOException
{
String
tailUrl
=
GitlabProject
.
URL
+
"/"
+
mergeRequest
.
getProjectId
()
+
String
tailUrl
=
GitlabProject
.
URL
+
"/"
+
mergeRequest
.
getProjectId
()
+
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getId
()
+
GitlabNote
.
URL
;
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getId
()
+
GitlabNote
.
URL
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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