Skip to content

Commit bfa8690

Browse files
randalpintoclayreimann
authored andcommitted
fix(user): unbreak filtering repos by visibility and affiliation
Filtering repositories by visibility and/or affiliation is mutually exclusive to searching by type. (https://developer.github.com/v3/repos/#list-your-repositories)
1 parent 1c051ba commit bfa8690

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Requestable.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ class Requestable {
9191
* @return - the options to pass to the request
9292
*/
9393
_getOptionsWithDefaults(requestOptions = {}) {
94-
requestOptions.type = requestOptions.type || 'all';
94+
if (!(requestOptions.visibility || requestOptions.affiliation)) {
95+
requestOptions.type = requestOptions.type || 'all';
96+
}
9597
requestOptions.sort = requestOptions.sort || 'updated';
9698
requestOptions.per_page = requestOptions.per_page || '100'; // jscs:ignore
9799

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy