github-0.16.0: Access to the GitHub API, v3.

LicenseBSD-3-Clause
MaintainerOleg Grenrus <oleg.grenrus@iki.fi>
Safe HaskellNone
LanguageHaskell2010

GitHub.Endpoints.Repos

Contents

Description

The Github Repos API, as documented at http://developer.github.com/v3/repos/

Synopsis

Querying repositories

currentUserRepos :: Auth -> RepoPublicity -> IO (Either Error (Vector Repo)) Source #

List your repositories.

userRepos :: Name Owner -> RepoPublicity -> IO (Either Error (Vector Repo)) Source #

The repos for a user, by their login. Can be restricted to just repos they own, are a member of, or publicize. Private repos will return empty list.

userRepos "mike-burns" All

userRepos' :: Maybe Auth -> Name Owner -> RepoPublicity -> IO (Either Error (Vector Repo)) Source #

The repos for a user, by their login. With authentication.

userRepos' (Just (BasicAuth (user, password))) "mike-burns" All

organizationRepos :: Name Organization -> IO (Either Error (Vector Repo)) Source #

The repos for an organization, by the organization name.

organizationRepos "thoughtbot"

organizationRepos' :: Maybe Auth -> Name Organization -> RepoPublicity -> IO (Either Error (Vector Repo)) Source #

The repos for an organization, by the organization name. With authentication.

organizationRepos (Just (BasicAuth (user, password))) "thoughtbot" All

repository :: Name Owner -> Name Repo -> IO (Either Error Repo) Source #

Details on a specific repo, given the owner and repo name.

userRepo "mike-burns" "github"

repository' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error Repo) Source #

Details on a specific repo, given the owner and repo name. With authentication.

userRepo' (Just (BasicAuth (user, password))) "mike-burns" "github"

contributors :: Name Owner -> Name Repo -> IO (Either Error (Vector Contributor)) Source #

The contributors to a repo, given the owner and repo name.

contributors "thoughtbot" "paperclip"

contributors' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector Contributor)) Source #

The contributors to a repo, given the owner and repo name. With authentication.

contributors' (Just (BasicAuth (user, password))) "thoughtbot" "paperclip"

contributorsWithAnonymous :: Name Owner -> Name Repo -> IO (Either Error (Vector Contributor)) Source #

The contributors to a repo, including anonymous contributors (such as deleted users or git commits with unknown email addresses), given the owner and repo name.

contributorsWithAnonymous "thoughtbot" "paperclip"

contributorsWithAnonymous' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector Contributor)) Source #

The contributors to a repo, including anonymous contributors (such as deleted users or git commits with unknown email addresses), given the owner and repo name. With authentication.

contributorsWithAnonymous' (Just (BasicAuth (user, password))) "thoughtbot" "paperclip"

languagesFor :: Name Owner -> Name Repo -> IO (Either Error Languages) Source #

The programming languages used in a repo along with the number of characters written in that language. Takes the repo owner and name.

languagesFor "mike-burns" "ohlaunch"

languagesFor' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error Languages) Source #

The programming languages used in a repo along with the number of characters written in that language. Takes the repo owner and name. With authentication.

languagesFor' (Just (BasicAuth (user, password))) "mike-burns" "ohlaunch"

tagsFor :: Name Owner -> Name Repo -> IO (Either Error (Vector Tag)) Source #

The git tags on a repo, given the repo owner and name.

tagsFor "thoughtbot" "paperclip"

tagsFor' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector Tag)) Source #

The git tags on a repo, given the repo owner and name. With authentication.

tagsFor' (Just (BasicAuth (user, password))) "thoughtbot" "paperclip"

branchesFor :: Name Owner -> Name Repo -> IO (Either Error (Vector Branch)) Source #

The git branches on a repo, given the repo owner and name.

branchesFor "thoughtbot" "paperclip"

branchesFor' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error (Vector Branch)) Source #

The git branches on a repo, given the repo owner and name. With authentication.

branchesFor' (Just (BasicAuth (user, password))) "thoughtbot" "paperclip"

contentsFor :: Name Owner -> Name Repo -> Text -> Maybe Text -> IO (Either Error Content) Source #

The contents of a file or directory in a repo, given the repo owner, name, and path to the file

contentsFor "thoughtbot" "paperclip" "README.md"

contentsFor' :: Maybe Auth -> Name Owner -> Name Repo -> Text -> Maybe Text -> IO (Either Error Content) Source #

The contents of a file or directory in a repo, given the repo owner, name, and path to the file With Authentication

contentsFor' (Just (BasicAuth (user, password))) "thoughtbot" "paperclip" "README.md" Nothing

readmeFor :: Name Owner -> Name Repo -> IO (Either Error Content) Source #

The contents of a README file in a repo, given the repo owner and name

readmeFor "thoughtbot" "paperclip"

readmeFor' :: Maybe Auth -> Name Owner -> Name Repo -> IO (Either Error Content) Source #

The contents of a README file in a repo, given the repo owner and name With Authentication

readmeFor' (Just (BasicAuth (user, password))) "thoughtbot" "paperclip"

Create

createRepo' :: Auth -> NewRepo -> IO (Either Error Repo) Source #

Create a new repository.

createRepo' (BasicAuth (user, password)) (newRepo "some_repo") {newRepoHasIssues = Just False}

createOrganizationRepo' :: Auth -> Name Organization -> NewRepo -> IO (Either Error Repo) Source #

Create a new repository for an organization.

createOrganizationRepo (BasicAuth (user, password)) "thoughtbot" (newRepo "some_repo") {newRepoHasIssues = Just False}

forkExistingRepoR :: Name Owner -> Name Repo -> Maybe (Name Owner) -> Request RW Repo Source #

Fork an existing repository. See https://developer.github.com/v3/repos/forks/#create-a-fork TODO: The third paramater (an optional Organisation) is not used yet.

Edit

editRepo Source #

Arguments

:: Auth 
-> Name Owner

owner

-> Name Repo

repository name

-> EditRepo 
-> IO (Either Error Repo) 

Edit an existing repository.

editRepo (BasicAuth (user, password)) "some_user" "some_repo" def {editDescription = Just "some description"}

Delete

deleteRepo :: Auth -> Name Owner -> Name Repo -> IO (Either Error ()) Source #

Delete an existing repository.

deleteRepo (BasicAuth (user, password)) "thoughtbot" "some_repo"

Data