8000 SearchService.Repositories doesn't work well · Issue #963 · google/go-github · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content 8000
SearchService.Repositories doesn't work well #963
Closed
@lizebang

Description

@lizebang

When I use SearchService.Repositories like this, there is a error.

	client := github.NewClient(nil)
	rs, _, err := client.Search.Repositories(context.Background(), "language:golang+stars:>=200+pushed:>=2018-01-01",
		&github.SearchOptions{Sort: "stars", Order: "desc", ListOptions: github.ListOptions{Page: 2, PerPage: 100}})
	......

Error:

GET https://api.github.com/search/repositories?order=desc&page=2&per_page=100&q=language%3Agolang%2Bstars%3A%3E%3D200%2Bpushed%3A%3E%3D2018-01-01&sort=stars: 422 Validation Failed [{Resource:Search Field:q Code:invalid Message:None of the search qualifiers apply to this search type.}]

The right URL is https://api.github.com/search/repositories?q=language:golang+pushed:%3E2018-01-01+stars:%3E=200&sort=stars&order=desc&page=2&per_page=100, not https://api.github.com/search/repositories?order=desc&page=2&per_page=100&q=language%3Agolang%2Bstars%3A%3E%3D200%2Bpushed%3A%3E%3D2018-01-01&sort=stars.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0