gitlab-haskell-0.3.2.0: 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 :: GitLab [Project] Source #

gets all projects.

projectForks Source #

Arguments

:: Text

name or namespace of the project

-> GitLab (Either (Response ByteString) [Project]) 

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

projectForks "project1"
projectForks "group1/project1"

searchProjectId Source #

Arguments

:: Int

project ID

-> GitLab (Either (Response ByteString) (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

:: Text

project name being searched for.

-> GitLab [Project] 

gets all projects with the given project name.

projectsWithName "project1"

projectsWithNameAndUser :: Text -> Text -> GitLab (Either (Response ByteString) (Maybe Project)) Source #

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

projectsWithNameAndUser "user1" "project1"

looks for "user1/project1"

multipleCommitters :: Project -> GitLab Bool Source #

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

commitsEmailAddresses :: Project -> GitLab [Text] Source #

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

commitsEmailAddresses' :: Int -> GitLab (Either (Response ByteString) [Text]) Source #

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

userProjects :: User -> GitLab (Maybe [Project]) Source #

gets all projects for a user.

userProjects myUser

userProjects' :: Text -> GitLab (Maybe [Project]) Source #

gets all projects for a user given their username.

userProjects "harry"

projectOfIssue :: Issue -> GitLab Project Source #

gets the Project against which the given Issue was created.

issuesCreatedByUser :: Text -> GitLab (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

:: Text

name or namespace of the project

-> GitLab [(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 :: Project -> GitLab (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

:: Project

the name or namespace of the project

-> GitLab Bool 

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

namespacePathToUserId Source #

Arguments

:: Text

name or namespace of project

-> GitLab (Maybe Int) 

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

projectDiffs :: Project -> Text -> GitLab (Either (Response ByteString) [Diff]) Source #

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

projectDiffs' :: Int -> Text -> GitLab (Either (Response ByteString) [Diff]) Source #

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

addGroupToProject Source #

Arguments

:: Int

group ID

-> Int

project ID

-> AccessLevel

level of access granted

-> GitLab (Either (Response ByteString) (Maybe GroupShare)) 

add a group to a project.

transferProject Source #

Arguments

:: Project

project

-> Text

namespace where to transfer project to

-> GitLab (Either (Response ByteString) Project) 

transfer a project to a new namespace.

transferProject' Source #

Arguments

:: Int

project ID

-> Text

namespace where to transfer project to

-> GitLab (Either (Response ByteString) Project) 

edit a project.

editProject Source #

Arguments

:: Project

project

-> EditProjectAttrs

EditProjectAttributes

-> GitLab (Either (Response ByteString) Project) 

edit a project.

editProject' Source #

Arguments

:: Int

project ID

-> EditProjectAttrs

EditProjectAttributes

-> GitLab (Either (Response ByteString) Project) 

edit a project.

defaultEditProjectAttrs Source #

Arguments

:: Int

project ID

-> EditProjectAttrs 

A default set of project attributes to override with the editProject functions.

data EditProjectAttrs Source #

Attributes for updating when editing a project with the editProject functions.

Constructors

EditProjectAttrs 

Fields

Instances

Instances details
Eq EditProjectAttrs Source # 
Instance details

Defined in GitLab.API.Projects

Show EditProjectAttrs Source # 
Instance details

Defined in GitLab.API.Projects

Generic EditProjectAttrs Source # 
Instance details

Defined in GitLab.API.Projects

Associated Types

type Rep EditProjectAttrs :: Type -> Type #

type Rep EditProjectAttrs Source # 
Instance details

Defined in GitLab.API.Projects

type Rep EditProjectAttrs = D1 ('MetaData "EditProjectAttrs" "GitLab.API.Projects" "gitlab-haskell-0.3.2.0-9NpXpkFcsI6HThrOS1lzn" 'False) (C1 ('MetaCons "EditProjectAttrs" 'PrefixI 'True) (((((S1 ('MetaSel ('Just "project_edit_allow_merge_on_skipped_pipeline") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "project_edit_analytics_access_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "project_edit_approvals_before_merge") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)))) :*: ((S1 ('MetaSel ('Just "project_edit_auto_cancel_pending_pipelines") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe EnabledDisabled)) :*: S1 ('MetaSel ('Just "project_edit_auto_devops_deploy_strategy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe AutoDeployStrategy))) :*: (S1 ('MetaSel ('Just "project_edit_auto_devops_enabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "project_edit_autoclose_referenced_issues") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))) :*: ((S1 ('MetaSel ('Just "project_edit_build_coverage_regex") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "project_edit_build_git_strategy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe GitStrategy)) :*: S1 ('MetaSel ('Just "project_edit_build_timeout") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)))) :*: ((S1 ('MetaSel ('Just "project_edit_builds_access_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ProjectSettingAccessLevel)) :*: S1 ('MetaSel ('Just "project_edit_ci_config_path") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "project_edit_ci_default_git_depth") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "project_edit_ci_forward_deployment_enabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))))) :*: (((S1 ('MetaSel ('Just "project_edit_container_registry_access_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ProjectSettingAccessLevel)) :*: (S1 ('MetaSel ('Just "project_edit_default_branch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "project_edit_description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "project_edit_emails_disabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "project_edit_external_authorization_classification_label") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "project_edit_forking_access_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ProjectSettingAccessLevel)) :*: S1 ('MetaSel ('Just "project_edit_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))) :*: ((S1 ('MetaSel ('Just "project_edit_import_url") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "project_edit_issues_access_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ProjectSettingAccessLevel)) :*: S1 ('MetaSel ('Just "project_edit_lfs_enabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "project_edit_merge_method") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MergeMethod)) :*: S1 ('MetaSel ('Just "project_edit_merge_requests_access_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ProjectSettingAccessLevel))) :*: (S1 ('MetaSel ('Just "project_edit_mirror_overwrites_diverged_branches") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "project_edit_mirror_trigger_builds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))))) :*: ((((S1 ('MetaSel ('Just "project_edit_mirror_user_id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "project_edit_mirror") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "project_edit_name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))) :*: ((S1 ('MetaSel ('Just "project_edit_operations_access_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ProjectSettingAccessLevel)) :*: S1 ('MetaSel ('Just "project_edit_only_allow_merge_if_all_discussions_are_resolved") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "project_edit_only_allow_merge_if_pipeline_succeeds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "project_edit_only_mirror_protected_branches") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))) :*: ((S1 ('MetaSel ('Just "project_edit_packages_enabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "project_edit_pages_access_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ProjectSettingAccessLevel)) :*: S1 ('MetaSel ('Just "project_edit_requirements_access_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ProjectSettingAccessLevel)))) :*: ((S1 ('MetaSel ('Just "project_edit_restrict_user_defined_variables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "project_edit_path") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "project_edit_public_builds") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "project_edit_remove_source_branch_after_merge") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))))) :*: (((S1 ('MetaSel ('Just "project_edit_repository_access_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ProjectSettingAccessLevel)) :*: (S1 ('MetaSel ('Just "project_edit_repository_storage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "project_edit_request_access_enabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))) :*: ((S1 ('MetaSel ('Just "project_edit_resolve_outdated_diff_discussions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "project_edit_service_desk_enabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "project_edit_shared_runners_enabled") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "project_edit_show_default_award_emojis") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool))))) :*: (((S1 ('MetaSel ('Just "project_edit_snippets_access_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ProjectSettingAccessLevel)) :*: S1 ('MetaSel ('Just "project_edit_squash_option") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SquashOption))) :*: (S1 ('MetaSel ('Just "project_edit_suggestion_commit_message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "project_edit_visibility") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Visibility)))) :*: ((S1 ('MetaSel ('Just "project_edit_wiki_access_level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ProjectSettingAccessLevel)) :*: S1 ('MetaSel ('Just "project_edit_issues_template") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "project_edit_merge_requests_template") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "project_edit_keep_latest_artifact") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Bool)))))))))

data EnabledDisabled Source #

Is auto-cancel pending pipelines enabled or disabled

Constructors

Enabled 
Disabled 

data AutoDeployStrategy Source #

Auto Deploy strategy: continuous, manual, or timed_incremental, for the editProject functions

data GitStrategy Source #

The Git strategy, defaults to fetch, for the editProject functions

Constructors

Clone 
Fetch 
None 

Instances

Instances details
Eq GitStrategy Source # 
Instance details

Defined in GitLab.API.Projects

Show GitStrategy Source # 
Instance details

Defined in GitLab.API.Projects

data MergeMethod Source #

The project git merge method, for the editProject functions

Constructors

Merge 
RebaseMerge 
FF 

Instances

Instances details
Eq MergeMethod Source # 
Instance details

Defined in GitLab.API.Projects

Show MergeMethod Source # 
Instance details

Defined in GitLab.API.Projects

data SquashOption Source #

The project git merge squash option, for the editProject functions

Instances

Instances details
Eq SquashOption Source # 
Instance details

Defined in GitLab.API.Projects

Show SquashOption Source # 
Instance details

Defined in GitLab.API.Projects