Skip to content
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

Add CommitID, InReplyTo, and SubjectType to DraftReviewComment #3169

Merged
merged 1 commit into from
May 14, 2024
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
24 changes: 24 additions & 0 deletions github/github-accessors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions github/github-accessors_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 12 additions & 9 deletions github/github-stringify_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions github/pulls_reviews.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ func (p PullRequestReview) String() string {

// DraftReviewComment represents a comment part of the review.
type DraftReviewComment struct {
Path *string `json:"path,omitempty"`
Position *int `json:"position,omitempty"`
Body *string `json:"body,omitempty"`
Path *string `json:"path,omitempty"`
Position *int `json:"position,omitempty"`
Body *string `json:"body,omitempty"`
CommitID *string `json:"commit_id,omitempty"`
InReplyTo *int64 `json:"in_reply_to,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On this page: https://docs.github.com/en/rest/pulls/reviews?apiVersion=2022-11-28#list-comments-for-a-pull-request-review--code-samples
I see in_reply_to_id but I'm not finding id_reply_to anywhere on the page.

Where are you finding that field?

Also, I'm not finding subject_type anywhere on that page. Where is that field coming from?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SubjectType *string `json:"subject_type,omitempty"`

// The new comfort-fade-preview fields
StartSide *string `json:"start_side,omitempty"`
Expand Down
Loading