gitlab-haskell-0.1.8: A Haskell library for the GitLab web API

Copyright(c) Rob Stewart Heriot-Watt University 2019
LicenseBSD3
Maintainerrobstewart57@gmail.com
Stabilitystable
Safe HaskellNone
LanguageHaskell2010

GitLab.API.Projects

Description

 
Synopsis

Documentation

allProjects :: MonadIO m => GitLab m [Project] Source #

gets all projects.

projectForks Source #

Arguments

:: (MonadUnliftIO m, MonadIO m) 
=> Text

name or namespace of the project

-> GitLab m (Either Status [Project]) 

gets all forks of a project. Supports use of namespaces.

projectForks "project1"
projectForks "group1/project1"

searchProjectId Source #

Arguments

:: MonadIO m 
=> Int

project ID

-> GitLab m (Either Status (Maybe Project)) 

searches for a Project with the given project ID, returns Nothing if a project with the given ID is not found.

projectsWithName Source #

Arguments

:: (MonadUnliftIO m, MonadIO m) 
=> Text

project name being searched for.

-> GitLab m [Project] 

gets all projects with the given project name.

projectsWithName "project1"

projectsWithNameAndUser :: (MonadUnliftIO m, MonadIO m) => Text -> Text -> GitLab m (Either Status (Maybe Project)) Source #

gets a project with the given name for the given username. E.g.

projectsNamespaceName "user1" "project1"

looks for "user1/project1"

multipleCommitters :: (MonadUnliftIO m, MonadIO m) => Project -> GitLab m Bool Source #

returns True if a project has multiple committers, according to the email addresses of the commits.

commitsEmailAddresses :: (MonadUnliftIO m, MonadIO m) => Project -> GitLab m [Text] Source #

gets the email addresses in the author information in all commit for a project.

commitsEmailAddresses' :: (MonadUnliftIO m, MonadIO m) => Int -> GitLab m (Either Status [Text]) Source #

gets the email addresses in the author information in all commit for a project defined by the project's ID.

userProjects' :: (MonadUnliftIO m, MonadIO m) => Text -> GitLab m (Maybe [Project]) Source #

gets all projects for a user given their username.

userProjects "harry"

userProjects :: (MonadUnliftIO m, MonadIO m) => User -> GitLab m (Maybe [Project]) Source #

gets all projects for a user.

userProjects myUser

projectOfIssue :: MonadIO m => Issue -> GitLab m Project Source #

gets the Project against which the given Issue was created.

issuesCreatedByUser :: (MonadUnliftIO m, MonadIO m) => Text -> GitLab m (Maybe (User, [Project])) Source #

finds all issues created by a user.

issuesCreatedByUser "user1"

returns a (user,projects) tuple, where user is the User found for the given searched username, and a list of Projects that the user has created issues for.

issuesOnForks Source #

Arguments

:: (MonadUnliftIO m, MonadIO m) 
=> Text

name or namespace of the project

-> GitLab m [(Project, [Issue], [User])] 

searches for all projects with the given name, and returns a list of triples of: 1) the found project, 2) the list of issues for the found projects, and 3) a list of users who've created issues.

projectMemebersCount :: MonadIO m => Project -> GitLab m (Text, [(Text, Text)]) Source #

returns a (namespace,members) tuple for the given Project, where namespace is the namespace of the project e.g. "user1/project1", and members is a list of (username,name) tuples about all members of the project.

projectCISuccess Source #

Arguments

:: MonadIO m 
=> Project

the name or namespace of the project

-> GitLab m Bool 

returns True is the last commit for a project passes all continuous integration tests.

namespacePathToUserId Source #

Arguments

:: MonadIO m 
=> Text

name or namespace of project

-> GitLab m (Maybe Int) 

searches for a username, and returns a user ID for that user, or Nothing if a user cannot be found.

projectDiffs :: MonadIO m => Project -> Text -> GitLab m (Either Status [Diff]) Source #

gets all diffs in a project for a given commit SHA.

projectDiffs' :: MonadIO m => Int -> Text -> GitLab m (Either Status [Diff]) Source #

gets all diffs in a project for a given project ID, for a given commit SHA.

shareProjectWithGroup Source #

Arguments

:: MonadIO m 
=> Int

group ID

-> Int

project ID

-> AccessLevel

level of access granted

-> GitLab m (Either Status GroupShare) 

share a project with a group.