Commit 30dc9290 authored by Greg Messner's avatar Greg Messner
Browse files

Changed the type for notableType to String (#279).

parent d53ad637
...@@ -38,6 +38,8 @@ public class Note { ...@@ -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 { public static enum NoteableType {
COMMIT, EPIC, ISSUE, MERGE_REQUEST, SNIPPET; COMMIT, EPIC, ISSUE, MERGE_REQUEST, SNIPPET;
...@@ -89,7 +91,10 @@ public class Note { ...@@ -89,7 +91,10 @@ public class Note {
private String fileName; private String fileName;
private Integer id; private Integer id;
private Integer noteableId; 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 Integer noteableIid;
private Boolean system; private Boolean system;
private String title; private String title;
...@@ -172,11 +177,11 @@ public class Note { ...@@ -172,11 +177,11 @@ public class Note {
this.noteableId = noteableId; this.noteableId = noteableId;
} }
public NoteableType getNoteableType() { public String getNoteableType() {
return noteableType; return noteableType;
} }
public void setNoteableType(NoteableType noteableType) { public void setNoteableType(String noteableType) {
this.noteableType = noteableType; this.noteableType = noteableType;
} }
......
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