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
ffdb9158
Commit
ffdb9158
authored
Sep 15, 2017
by
Tomas Bjerre
Committed by
Tim Olshansky
Sep 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using MR IID instead of ID (#250)
parent
39402e08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
GitlabAPI.java
src/main/java/org/gitlab/api/GitlabAPI.java
+10
-10
No files found.
src/main/java/org/gitlab/api/GitlabAPI.java
View file @
ffdb9158
...
...
@@ -1238,7 +1238,7 @@ public class GitlabAPI {
*/
public
GitlabNote
getNote
(
GitlabMergeRequest
mergeRequest
,
Integer
noteId
)
throws
IOException
{
String
tailUrl
=
GitlabProject
.
URL
+
"/"
+
mergeRequest
.
getProjectId
()
+
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getId
()
+
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getI
i
d
()
+
GitlabNote
.
URL
+
"/"
+
noteId
;
return
retrieve
().
to
(
tailUrl
,
GitlabNote
.
class
);
...
...
@@ -1246,7 +1246,7 @@ public class GitlabAPI {
public
List
<
GitlabNote
>
getNotes
(
GitlabMergeRequest
mergeRequest
)
throws
IOException
{
String
tailUrl
=
GitlabProject
.
URL
+
"/"
+
mergeRequest
.
getProjectId
()
+
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getId
()
+
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getI
i
d
()
+
GitlabNote
.
URL
;
GitlabNote
[]
notes
=
retrieve
().
to
(
tailUrl
,
GitlabNote
[].
class
);
...
...
@@ -1255,7 +1255,7 @@ public class GitlabAPI {
public
List
<
GitlabNote
>
getAllNotes
(
GitlabMergeRequest
mergeRequest
)
throws
IOException
{
String
tailUrl
=
GitlabProject
.
URL
+
"/"
+
mergeRequest
.
getProjectId
()
+
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getId
()
+
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getI
i
d
()
+
GitlabNote
.
URL
+
PARAM_MAX_ITEMS_PER_PAGE
;
return
retrieve
().
getAll
(
tailUrl
,
GitlabNote
[].
class
);
...
...
@@ -1558,14 +1558,14 @@ public class GitlabAPI {
.
appendIf
(
"body"
,
body
);
String
tailUrl
=
GitlabProject
.
URL
+
"/"
+
mergeRequest
.
getProjectId
()
+
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getId
()
+
GitlabNote
.
URL
+
"/"
+
noteId
+
query
.
toString
();
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getI
i
d
()
+
GitlabNote
.
URL
+
"/"
+
noteId
+
query
.
toString
();
return
retrieve
().
method
(
"PUT"
).
to
(
tailUrl
,
GitlabNote
.
class
);
}
public
GitlabNote
createNote
(
GitlabMergeRequest
mergeRequest
,
String
body
)
throws
IOException
{
String
tailUrl
=
GitlabProject
.
URL
+
"/"
+
mergeRequest
.
getProjectId
()
+
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getId
()
+
GitlabNote
.
URL
;
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getI
i
d
()
+
GitlabNote
.
URL
;
return
dispatch
().
with
(
"body"
,
body
).
to
(
tailUrl
,
GitlabNote
.
class
);
}
...
...
@@ -1579,7 +1579,7 @@ public class GitlabAPI {
*/
public
void
deleteNote
(
GitlabMergeRequest
mergeRequest
,
GitlabNote
noteToDelete
)
throws
IOException
{
String
tailUrl
=
GitlabProject
.
URL
+
"/"
+
mergeRequest
.
getProjectId
()
+
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getId
()
+
GitlabNote
.
URL
+
"/"
+
noteToDelete
.
getId
();
+
mergeRequest
.
getI
i
d
()
+
GitlabNote
.
URL
+
"/"
+
noteToDelete
.
getId
();
retrieve
().
method
(
"DELETE"
).
to
(
tailUrl
,
GitlabNote
.
class
);
}
...
...
@@ -2487,7 +2487,7 @@ public class GitlabAPI {
*/
public
List
<
GitlabAward
>
getAllAwards
(
GitlabMergeRequest
mergeRequest
)
throws
IOException
{
String
tailUrl
=
GitlabProject
.
URL
+
"/"
+
mergeRequest
.
getProjectId
()
+
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getId
()
+
GitlabAward
.
URL
+
PARAM_MAX_ITEMS_PER_PAGE
;
+
mergeRequest
.
getI
i
d
()
+
GitlabAward
.
URL
+
PARAM_MAX_ITEMS_PER_PAGE
;
return
retrieve
().
getAll
(
tailUrl
,
GitlabAward
[].
class
);
}
...
...
@@ -2501,7 +2501,7 @@ public class GitlabAPI {
*/
public
GitlabAward
getAward
(
GitlabMergeRequest
mergeRequest
,
Integer
awardId
)
throws
IOException
{
String
tailUrl
=
GitlabProject
.
URL
+
"/"
+
mergeRequest
.
getProjectId
()
+
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getId
()
+
GitlabAward
.
URL
+
"/"
+
awardId
;
+
mergeRequest
.
getI
i
d
()
+
GitlabAward
.
URL
+
"/"
+
awardId
;
return
retrieve
().
to
(
tailUrl
,
GitlabAward
.
class
);
}
...
...
@@ -2516,7 +2516,7 @@ public class GitlabAPI {
public
GitlabAward
createAward
(
GitlabMergeRequest
mergeRequest
,
String
awardName
)
throws
IOException
{
Query
query
=
new
Query
().
append
(
"name"
,
awardName
);
String
tailUrl
=
GitlabProject
.
URL
+
"/"
+
mergeRequest
.
getProjectId
()
+
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getId
()
+
GitlabAward
.
URL
+
query
.
toString
();
+
mergeRequest
.
getI
i
d
()
+
GitlabAward
.
URL
+
query
.
toString
();
return
dispatch
().
to
(
tailUrl
,
GitlabAward
.
class
);
}
...
...
@@ -2530,7 +2530,7 @@ public class GitlabAPI {
*/
public
void
deleteAward
(
GitlabMergeRequest
mergeRequest
,
GitlabAward
award
)
throws
IOException
{
String
tailUrl
=
GitlabProject
.
URL
+
"/"
+
mergeRequest
.
getProjectId
()
+
GitlabMergeRequest
.
URL
+
"/"
+
mergeRequest
.
getId
()
+
GitlabAward
.
URL
+
"/"
+
award
.
getId
();
+
mergeRequest
.
getI
i
d
()
+
GitlabAward
.
URL
+
"/"
+
award
.
getId
();
retrieve
().
method
(
"DELETE"
).
to
(
tailUrl
,
Void
.
class
);
}
...
...
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