Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
30dc9290
Commit
30dc9290
authored
6 years ago
by
Greg Messner
Browse files
Options
Download
Email Patches
Plain Diff
Changed the type for notableType to String (#279).
parent
d53ad637
main
5.0.x
5.0.x.jdk17
6.x
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/gitlab4j/api/models/Note.java
+8
-3
src/main/java/org/gitlab4j/api/models/Note.java
with
8 additions
and
3 deletions
+8
-3
src/main/java/org/gitlab4j/api/models/Note.java
+
8
-
3
View file @
30dc9290
...
...
@@ -38,6 +38,8 @@ public class Note {
}
}
// This is not used because the GitLab example JSON is using a funny string for the MERGE_REQUEST notable_type ("Merge request").
// Once they fix the bug, the notableType field can be changed from String to NotableType.
public
static
enum
NoteableType
{
COMMIT
,
EPIC
,
ISSUE
,
MERGE_REQUEST
,
SNIPPET
;
...
...
@@ -89,7 +91,10 @@ public class Note {
private
String
fileName
;
private
Integer
id
;
private
Integer
noteableId
;
private
NoteableType
noteableType
;
// Use String for noteableType until the constant is fixed in the GitLab API
private
String
noteableType
;
private
Integer
noteableIid
;
private
Boolean
system
;
private
String
title
;
...
...
@@ -172,11 +177,11 @@ public class Note {
this
.
noteableId
=
noteableId
;
}
public
NoteableType
getNoteableType
()
{
public
String
getNoteableType
()
{
return
noteableType
;
}
public
void
setNoteableType
(
NoteableType
noteableType
)
{
public
void
setNoteableType
(
String
noteableType
)
{
this
.
noteableType
=
noteableType
;
}
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets