Copyright | (c) Rob Stewart Heriot-Watt University 2019 |
---|---|
License | BSD3 |
Maintainer | robstewart57@gmail.com |
Stability | stable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- mergeRequests :: Project -> GitLab [MergeRequest]
- mergeRequestsWith :: Project -> MergeProjectAttrs -> GitLab [MergeRequest]
- mergeRequest :: Project -> Int -> GitLab (Either (Response ByteString) (Maybe MergeRequest))
- createMergeRequest :: Project -> Text -> Text -> Int -> Text -> Text -> GitLab (Either (Response ByteString) (Maybe MergeRequest))
- acceptMergeRequest :: Project -> Int -> GitLab (Either (Response ByteString) (Maybe MergeRequest))
- deleteMergeRequest :: Project -> Int -> GitLab (Either (Response ByteString) (Maybe ()))
- mrAttrs :: MergeProjectAttrs
- data MergeProjectAttrs = MergeProjectAttrs {
- mr_attr_state :: Maybe MergeRequestState
- mr_attr_order_by :: Maybe OrderBy
- mr_attr_sort :: Maybe SortBy
- mr_attr_milestone :: Maybe Milestone
- mr_attr_labels :: Maybe Text
- mr_attr_with_labels_details :: Maybe Bool
- mr_attr_with_merge_status_recheck :: Maybe Bool
- mr_attr_created_after :: Maybe UTCTime
- mr_attr_created_before :: Maybe UTCTime
- mr_attr_updated_after :: Maybe UTCTime
- mr_attr_updated_before :: Maybe UTCTime
- mr_attr_scope :: Maybe Scope
- mr_attr_author_id :: Maybe Int
- mr_attr_author_username :: Maybe Text
- mr_attr_assignee_id :: Maybe Int
- mr_attr_approver_ids :: Maybe [Int]
- mr_attr_approved_by_ids :: Maybe [Int]
- mr_attr_reviewer_id :: Maybe Int
- mr_attr_reviewer_username :: Maybe Text
- mr_attr_my_reaction_emoji :: Maybe Text
- mr_attr_source_branch :: Maybe Text
- mr_attr_target_branch :: Maybe Text
- mr_attr_search :: Maybe Text
- mr_attr_in :: Maybe SearchIn
- mr_attr_wip :: Maybe WIP
- mr_attr_environment :: Maybe UTCTime
- mr_attr_deployed_before :: Maybe UTCTime
- mr_attr_deployed_after :: Maybe UTCTime
- data MergeRequestState
- data WIP
List merge requests
:: Project | the project |
-> GitLab [MergeRequest] |
returns the merge requests for a project.
:: Project | the project |
-> MergeProjectAttrs | merge request search attributes |
-> GitLab [MergeRequest] |
returns the merge requests for a project and a set of search
attributes as Just
values in MergeProjectAttrs
. The mrAttrs
value has default merge request search values, which is a record
that can be modified with Just
values.
For example to search only for open merge requests for a project:
mergeRequestsWith myProject (mrAttrs {mr_attr_state = Just MROpened})
Get single MR
:: Project | project |
-> Int | merge request IID |
-> GitLab (Either (Response ByteString) (Maybe MergeRequest)) |
returns the merge request for a project given its merge request IID.
Create MR
:: Project | project |
-> Text | source branch |
-> Text | target branch |
-> Int | target project ID |
-> Text | merge request title |
-> Text | merge request description |
-> GitLab (Either (Response ByteString) (Maybe MergeRequest)) |
Creates a merge request.
Accept MR
:: Project | project |
-> Int | merge request IID |
-> GitLab (Either (Response ByteString) (Maybe MergeRequest)) |
Accepts a merge request.
Delete a merge request
Deletes a merge request. Only for admins and project owners.
merge request attributes
mrAttrs :: MergeProjectAttrs Source #
No merge request search filters, thereby returning all merge requests. Default scope is "all".
data MergeProjectAttrs Source #
Attributes when searching for merge requests with the
mergeRequestsWith
functions.
MergeProjectAttrs | |
|
data MergeRequestState Source #
for filtering by merge request state.
MROpened | return only opened merge requests |
MRClosed | return only closed merge requests |
MRLocked | return only locked merge requests |
MRMerged | return only merged merge requests |
Instances
Show MergeRequestState Source # | |
Defined in GitLab.API.MergeRequests showsPrec :: Int -> MergeRequestState -> ShowS # show :: MergeRequestState -> String # showList :: [MergeRequestState] -> ShowS # |