Skip to content

Add more field to NoteEvent.ObjectAttributes #670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/main/java/org/gitlab4j/api/webhook/NoteEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ public static class ObjectAttributes {

private Integer id;
private String note;
private String discussionId;
private String type;
private NoteableType noteableType;
private Integer authorId;
private Date createdAt;
Expand Down Expand Up @@ -160,6 +162,22 @@ public void setNote(String note) {
this.note = note;
}

public String getDiscussionId() {
return discussionId;
}

public void setDiscussionId(String discussionId) {
this.discussionId = discussionId;
}

public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public NoteableType getNoteableType() {
return noteableType;
}
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/org/gitlab4j/api/note-commit-event.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"object_attributes": {
"id": 1243,
"note": "This is a commit comment. How does this work?",
"discussion_id": "56e2b4210419aed077d47ca2dc00551c7c4ac882",
"type": "DiscussionNote",
"noteable_type": "Commit",
"author_id": 1,
"created_at": "2015-05-17T18:08:09Z",
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/org/gitlab4j/api/note-issue-event.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"object_attributes": {
"id": 1241,
"note": "Hello world",
"discussion_id": "56e2b4210419aed077d47ca2dc00551c7c4ac882",
"type": "DiscussionNote",
"noteable_type": "Issue",
"author_id": 1,
"created_at": "2015-05-17T17:06:40Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"object_attributes": {
"id": 1244,
"note": "This MR needs work.",
"discussion_id": "56e2b4210419aed077d47ca2dc00551c7c4ac882",
"type": "DiscussionNote",
"noteable_type": "MergeRequest",
"author_id": 1,
"created_at": "2015-05-17T18:21:36Z",
Expand Down
2 changes: 2 additions & 0 deletions src/test/resources/org/gitlab4j/api/note-snippet-event.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
"object_attributes": {
"id": 1245,
"note": "Is this snippet doing what it's supposed to be doing?",
"discussion_id": "56e2b4210419aed077d47ca2dc00551c7c4ac882",
"type": "DiscussionNote",
"noteable_type": "Snippet",
"author_id": 1,
"created_at": "2015-05-17T18:35:50Z",
Expand Down