Skip to content

Commit 512c583

Browse files
author
Juan
authored
Remove Sort & Direction Fields From IssueComments (#1584)
1 parent 954e7c8 commit 512c583

File tree

3 files changed

+2
-28
lines changed

3 files changed

+2
-28
lines changed

github/github-accessors.go

-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

github/issues_comments.go

-6
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ func (i IssueComment) String() string {
3535
// IssueListCommentsOptions specifies the optional parameters to the
3636
// IssuesService.ListComments method.
3737
type IssueListCommentsOptions struct {
38-
// Sort specifies how to sort comments. Possible values are: created, updated.
39-
Sort *string `url:"sort,omitempty"`
40-
41-
// Direction in which to sort comments. Possible values are: asc, desc.
42-
Direction *string `url:"direction,omitempty"`
43-
4438
// Since filters comments by time.
4539
Since *time.Time `url:"since,omitempty"`
4640

github/issues_comments_test.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,14 @@ func TestIssuesService_ListComments_allIssues(t *testing.T) {
2323
testMethod(t, r, "GET")
2424
testHeader(t, r, "Accept", mediaTypeReactionsPreview)
2525
testFormValues(t, r, values{
26-
"sort": "updated",
27-
"direction": "desc",
28-
"since": "2002-02-10T15:30:00Z",
29-
"page": "2",
26+
"since": "2002-02-10T15:30:00Z",
27+
"page": "2",
3028
})
3129
fmt.Fprint(w, `[{"id":1}]`)
3230
})
3331

3432
since := time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC)
3533
opt := &IssueListCommentsOptions{
36-
Sort: String("updated"),
37-
Direction: String("desc"),
3834
Since: &since,
3935
ListOptions: ListOptions{Page: 2},
4036
}

0 commit comments

Comments
 (0)