Skip to content

Commit

Permalink
feat: ignore archived repos in search (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
marwanhawari authored Jan 19, 2025
1 parent 9436857 commit b54a7b1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,10 @@ type GithubSearchResult struct {
}

func getGithubSearchJSON(searchQuery string) (string, error) {
url := fmt.Sprintf("https://api.github.com/search/repositories?q=%v%v", searchQuery, "+fork:true")
if searchQuery == "" {
return "", InvalidGithubSearchQueryError{}
}
url := fmt.Sprintf("https://api.github.com/search/repositories?q=%v%v", searchQuery, "+fork:true+archived:false")

response, err := getHTTPResponseBody(url)
if err != nil {
Expand Down

0 comments on commit b54a7b1

Please sign in to comment.