github-0.14.0: Access to the Github API, v3.

Safe HaskellNone
LanguageHaskell2010

Github.Repos

Contents

Description

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

Synopsis

Querying repositories

userRepos :: Name GithubOwner -> 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 GithubAuth -> Name GithubOwner -> RepoPublicity -> IO (Either Error (Vector Repo)) Source

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

userRepos' (Just (GithubBasicAuth (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 GithubAuth -> Name Organization -> RepoPublicity -> IO (Either Error (Vector Repo)) Source

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

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

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

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

userRepo "mike-burns" "github"

repository' :: Maybe GithubAuth -> Name GithubOwner -> Name Repo -> IO (Either Error Repo) Source

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

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

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

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

contributors "thoughtbot" "paperclip"

contributors' :: Maybe GithubAuth -> Name GithubOwner -> Name Repo -> IO (Either Error (Vector Contributor)) Source

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

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

contributorsWithAnonymous :: Name GithubOwner -> 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 GithubAuth -> Name GithubOwner -> 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 (GithubBasicAuth (user, password))) "thoughtbot" "paperclip"

languagesFor :: Name GithubOwner -> 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 GithubAuth -> Name GithubOwner -> 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 (GithubBasicAuth (user, password))) "mike-burns" "ohlaunch"

tagsFor :: Name GithubOwner -> 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 GithubAuth -> Name GithubOwner -> Name Repo -> IO (Either Error (Vector Tag)) Source

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

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

branchesFor :: Name GithubOwner -> 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 GithubAuth -> Name GithubOwner -> Name Repo -> IO (Either Error (Vector Branch)) Source

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

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

contentsFor :: Name GithubOwner -> Name Repo -> String -> Maybe String -> 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 GithubAuth -> Name GithubOwner -> Name Repo -> String -> Maybe String -> 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 (GithubBasicAuth (user, password))) "thoughtbot" "paperclip" "README.md" Nothing

readmeFor :: Name GithubOwner -> 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 GithubAuth -> Name GithubOwner -> 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 (GithubBasicAuth (user, password))) "thoughtbot" "paperclip"

Create

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

Create a new repository.

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

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

Create a new repository for an organization.

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

Edit

editRepo Source

Arguments

:: GithubAuth 
-> Name GithubOwner

owner

-> Name Repo

repository name

-> EditRepo 
-> IO (Either Error Repo) 

Edit an existing repository.

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

Delete

deleteRepo :: GithubAuth -> Name GithubOwner -> Name Repo -> IO (Either Error ()) Source

Delete an existing repository.

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

Data