diff --git a/github/github-accessors.go b/github/github-accessors.go index 0bb206bd509..687c9689f09 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -9940,6 +9940,14 @@ func (r *RepositoryComment) GetID() int64 { return *r.ID } +// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. +func (r *RepositoryComment) GetNodeID() string { + if r == nil || r.NodeID == nil { + return "" + } + return *r.NodeID +} + // GetPath returns the Path field if it's non-nil, zero value otherwise. func (r *RepositoryComment) GetPath() string { if r == nil || r.Path == nil { diff --git a/github/github-stringify_test.go b/github/github-stringify_test.go index 2271a9d2b11..e8c0e2683ac 100644 --- a/github/github-stringify_test.go +++ b/github/github-stringify_test.go @@ -1262,6 +1262,7 @@ func TestRepositoryComment_String(t *testing.T) { HTMLURL: String(""), URL: String(""), ID: Int64(0), + NodeID: String(""), CommitID: String(""), User: &User{}, Reactions: &Reactions{}, @@ -1269,7 +1270,7 @@ func TestRepositoryComment_String(t *testing.T) { Path: String(""), Position: Int(0), } - want := `github.RepositoryComment{HTMLURL:"", URL:"", ID:0, CommitID:"", User:github.User{}, Reactions:github.Reactions{}, Body:"", Path:"", Position:0}` + want := `github.RepositoryComment{HTMLURL:"", URL:"", ID:0, NodeID:"", CommitID:"", User:github.User{}, Reactions:github.Reactions{}, Body:"", Path:"", Position:0}` if got := v.String(); got != want { t.Errorf("RepositoryComment.String = %v, want %v", got, want) } diff --git a/github/repos_comments.go b/github/repos_comments.go index fa2377d403d..380ca3d3b43 100644 --- a/github/repos_comments.go +++ b/github/repos_comments.go @@ -16,6 +16,7 @@ type RepositoryComment struct { HTMLURL *string `json:"html_url,omitempty"` URL *string `json:"url,omitempty"` ID *int64 `json:"id,omitempty"` + NodeID *string `json:"node_id,omitempty"` CommitID *string `json:"commit_id,omitempty"` User *User `json:"user,omitempty"` Reactions *Reactions `json:"reactions,omitempty"`