You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2017. It is now read-only.
title:More flexible options for listing repositories
4
+
created_at:2015-07-22
5
+
author_name:jakeboxer
6
+
---
7
+
8
+
The[List your repositories][list-your-repos] API now offers additional parameters to help you fetch the exact set of repositories you're looking for:
9
+
10
+
- The`visibility` parameter lets you request only your public repositories, only your private repositories, or both.
11
+
- With the`affiliation` parameter, you can ask for repositories you own, repositories where you are a collaborator, repositories you have access to as an organization member, or any combination that suits your needs.
12
+
13
+
Use these new parameters separately, together, or in combination with other parameters to craft flexible queries that fetch the specific repositories you're seeking.
14
+
15
+
For full details, check out the[documentation][list-your-repos]. If you have any questions, please[get in touch][contact]!
Copy file name to clipboardExpand all lines: content/v3/repos.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,11 +21,12 @@ authenticated user has access to through an organization membership.
21
21
22
22
Name | Type | Description
23
23
-----|------|--------------
24
-
`type`|`string` | Can be one of`all`,`owner`,`public`,`private`,`member`. Default:`all`
24
+
`visibility` |`string` | Can be one of`all`,`public`, or`private`. Default:`all`
25
+
`affiliation` |`string` | Comma-separated list of values. Can include:<br />*`owner`: Repositories that are owned by the authenticated user.<br />*`collaborator`: Repositories that the user has been added to as a collaborator.<br />*`organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on.<br /><br />Default:`owner,collaborator,organization_member`
26
+
`type`|`string` | Can be one of`all`,`owner`,`public`,`private`,`member`. Default:`all`<br /><br />Will cause a`422` error if used in the same request as**visibility** or**affiliation**.
25
27
`sort`|`string` | Can be one of`created`,`updated`,`pushed`,`full_name`. Default:`full_name`
26
28
`direction`|`string` | Can be one of`asc` or`desc`. Default: when using`full_name`:`asc`; otherwise`desc`