From 4bbd9e29e18858d21b7e46b31230e46dd3d89e64 Mon Sep 17 00:00:00 2001 From: Cenk Alti Date: Wed, 17 Jan 2024 11:34:22 -0500 Subject: [PATCH 1/2] add missing fields in Note struct --- notes.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/notes.go b/notes.go index 5e80f146e..e5379ea61 100644 --- a/notes.go +++ b/notes.go @@ -50,9 +50,12 @@ type Note struct { WebURL string `json:"web_url"` } `json:"author"` System bool `json:"system"` + Internal bool `json:"internal"` + Confidential bool `json:"confidential"` ExpiresAt *time.Time `json:"expires_at"` UpdatedAt *time.Time `json:"updated_at"` CreatedAt *time.Time `json:"created_at"` + ProjectID int `json:"project_id"` NoteableID int `json:"noteable_id"` NoteableType string `json:"noteable_type"` CommitID string `json:"commit_id"` From 42426a3f2bf17f576e7f55e87fdc62141a82f450 Mon Sep 17 00:00:00 2001 From: Sander van Harmelen Date: Wed, 17 Jan 2024 19:54:04 +0100 Subject: [PATCH 2/2] Try to follow order in the docs --- notes.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/notes.go b/notes.go index e5379ea61..0c57ae229 100644 --- a/notes.go +++ b/notes.go @@ -50,18 +50,18 @@ type Note struct { WebURL string `json:"web_url"` } `json:"author"` System bool `json:"system"` - Internal bool `json:"internal"` - Confidential bool `json:"confidential"` - ExpiresAt *time.Time `json:"expires_at"` - UpdatedAt *time.Time `json:"updated_at"` CreatedAt *time.Time `json:"created_at"` - ProjectID int `json:"project_id"` - NoteableID int `json:"noteable_id"` - NoteableType string `json:"noteable_type"` + UpdatedAt *time.Time `json:"updated_at"` + ExpiresAt *time.Time `json:"expires_at"` CommitID string `json:"commit_id"` Position *NotePosition `json:"position"` + NoteableID int `json:"noteable_id"` + NoteableType string `json:"noteable_type"` + ProjectID int `json:"project_id"` + NoteableIID int `json:"noteable_iid"` Resolvable bool `json:"resolvable"` Resolved bool `json:"resolved"` + ResolvedAt *time.Time `json:"resolved_at"` ResolvedBy struct { ID int `json:"id"` Username string `json:"username"` @@ -71,8 +71,8 @@ type Note struct { AvatarURL string `json:"avatar_url"` WebURL string `json:"web_url"` } `json:"resolved_by"` - ResolvedAt *time.Time `json:"resolved_at"` - NoteableIID int `json:"noteable_iid"` + Confidential bool `json:"confidential"` + Internal bool `json:"internal"` } // NotePosition represents the position attributes of a note.