From 08bb599b461f73841736d7269029562423ae9037 Mon Sep 17 00:00:00 2001 From: Omar Jarjur Date: Fri, 11 Sep 2015 12:42:28 -0700 Subject: [PATCH] Add comment location fields to the PullRequestComment struct. This change adds the fields "DiffHunk", "OriginalPosition", and "OriginalCommitId" to the PullRequestComment struct. These fields provide important information about the location of a comment. --- github/pulls_comments.go | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/github/pulls_comments.go b/github/pulls_comments.go index 35c7241..f165d5f 100644 --- a/github/pulls_comments.go +++ b/github/pulls_comments.go @@ -12,14 +12,17 @@ import ( // PullRequestComment represents a comment left on a pull request. type PullRequestComment struct { - ID *int `json:"id,omitempty"` - Body *string `json:"body,omitempty"` - Path *string `json:"path,omitempty"` - Position *int `json:"position,omitempty"` - CommitID *string `json:"commit_id,omitempty"` - User *User `json:"user,omitempty"` - CreatedAt *time.Time `json:"created_at,omitempty"` - UpdatedAt *time.Time `json:"updated_at,omitempty"` + ID *int `json:"id,omitempty"` + Body *string `json:"body,omitempty"` + Path *string `json:"path,omitempty"` + DiffHunk *string `json:"diff_hunk,omitempty"` + Position *int `json:"position,omitempty"` + OriginalPosition *int `json:"original_position,omitempty"` + CommitID *string `json:"commit_id,omitempty"` + OriginalCommitID *string `json:"original_commit_id,omitempty"` + User *User `json:"user,omitempty"` + CreatedAt *time.Time `json:"created_at,omitempty"` + UpdatedAt *time.Time `json:"updated_at,omitempty"` } func (p PullRequestComment) String() string {