+
Skip to content

Fix: Remove Sort & Direction Fields From IssueListCommentsOptions #1584

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

Merged
merged 1 commit into from
Aug 10, 2020
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
16 changes: 0 additions & 16 deletions github/github-accessors.go

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

6 changes: 0 additions & 6 deletions github/issues_comments.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ func (i IssueComment) String() string {
// IssueListCommentsOptions specifies the optional parameters to the
// IssuesService.ListComments method.
type IssueListCommentsOptions struct {
// Sort specifies how to sort comments. Possible values are: created, updated.
Sort *string `url:"sort,omitempty"`

// Direction in which to sort comments. Possible values are: asc, desc.
Direction *string `url:"direction,omitempty"`

// Since filters comments by time.
Since *time.Time `url:"since,omitempty"`

Expand Down
8 changes: 2 additions & 6 deletions github/issues_comments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,14 @@ func TestIssuesService_ListComments_allIssues(t *testing.T) {
testMethod(t, r, "GET")
testHeader(t, r, "Accept", mediaTypeReactionsPreview)
testFormValues(t, r, values{
"sort": "updated",
"direction": "desc",
"since": "2002-02-10T15:30:00Z",
"page": "2",
"since": "2002-02-10T15:30:00Z",
"page": "2",
})
fmt.Fprint(w, `[{"id":1}]`)
})

since := time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC)
opt := &IssueListCommentsOptions{
Sort: String("updated"),
Direction: String("desc"),
Since: &since,
ListOptions: ListOptions{Page: 2},
}
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载