File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -203,11 +203,11 @@ module Github.All (
203203 --
204204 -- Missing endpoints:
205205 --
206- -- * List your repositories
207206 -- * List all public repositories
208207 -- * List Teams
209208 -- * Get Branch
210209 -- * Enabling and disabling branch protection
210+ currentUserReposR ,
211211 userReposR ,
212212
213213 -- ** Collaborators
Original file line number Diff line number Diff line change 66-- <http://developer.github.com/v3/repos/>
77module Github.Repos (
88 -- * Querying repositories
9+ currentUserRepos ,
10+ currentUserReposR ,
911 userRepos ,
1012 userRepos' ,
1113 userReposR ,
@@ -69,6 +71,19 @@ repoPublicityQueryString Member = [("type", Just "member")]
6971repoPublicityQueryString Public = [(" type" , Just " public" )]
7072repoPublicityQueryString Private = [(" type" , Just " private" )]
7173
74+ -- | List your repositories.
75+ currentUserRepos :: GithubAuth -> RepoPublicity -> IO (Either Error (Vector Repo ))
76+ currentUserRepos auth publicity =
77+ executeRequest auth $ currentUserReposR publicity Nothing
78+
79+ -- | List your repositories.
80+ -- See <https://developer.github.com/v3/repos/#list-your-repositories>
81+ currentUserReposR :: RepoPublicity -> Maybe Count -> GithubRequest k (Vector Repo )
82+ currentUserReposR publicity =
83+ GithubPagedGet [" user" , " repos" ] qs
84+ where
85+ qs = repoPublicityQueryString publicity
86+
7287-- | The repos for a user, by their login. Can be restricted to just repos they
7388-- own, are a member of, or publicize. Private repos will return empty list.
7489--
Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ test-suite github-test
118118 other-modules :
119119 Github.CommitsSpec
120120 Github.OrganizationsSpec
121+ Github.ReposSpec
121122 Github.SearchSpec
122123 Github.UsersSpec
123124 main-is : Spec.hs
You can’t perform that action at this time.
0 commit comments