Copyright | (c) Rob Stewart Heriot-Watt University 2021 |
---|---|
License | BSD3 |
Maintainer | robstewart57@gmail.com |
Stability | stable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- projectIssueDiscussions :: Project -> Int -> GitLab (Either (Response ByteString) [Discussion])
- issueDiscussion :: Project -> Int -> Int -> GitLab (Either (Response ByteString) (Maybe Discussion))
- createIssueThread :: Project -> Int -> Text -> GitLab (Either (Response ByteString) (Maybe Discussion))
- addNoteToIssueThread :: Project -> Int -> Int -> Text -> GitLab (Either (Response ByteString) (Maybe Discussion))
- modifyThreadNoteIssue :: Project -> Int -> Int -> Int -> Text -> GitLab (Either (Response ByteString) (Maybe Discussion))
- deleteIssueThreadNote :: Project -> Int -> Int -> Int -> GitLab (Either (Response ByteString) (Maybe ()))
- snippetDiscussionItems :: Project -> Int -> GitLab (Either (Response ByteString) [Discussion])
- snippetDiscussionItem :: Project -> Int -> Int -> GitLab (Either (Response ByteString) (Maybe Discussion))
- createSnippetThread :: Project -> Int -> Text -> GitLab (Either (Response ByteString) (Maybe Discussion))
- addNoteToSnippetThread :: Project -> Int -> Int -> Text -> GitLab (Either (Response ByteString) (Maybe Discussion))
- modifySnippetThreadNote :: Project -> Int -> Int -> Int -> Text -> GitLab (Either (Response ByteString) (Maybe Discussion))
- deleteSnippetThreadNote :: Project -> Int -> Int -> Int -> GitLab (Either (Response ByteString) (Maybe ()))
- projectMergeRequestDiscussionItems :: Project -> Int -> GitLab (Either (Response ByteString) [Discussion])
- mergeRequestDiscussionItems :: Project -> Int -> Int -> GitLab (Either (Response ByteString) (Maybe Discussion))
- createMergeRequestThread :: Project -> Int -> Text -> Text -> Text -> Text -> PositionReference -> Text -> Text -> GitLab (Either (Response ByteString) (Maybe Discussion))
- resolveMergeRequestThread :: Project -> Int -> Int -> Bool -> GitLab (Either (Response ByteString) (Maybe Discussion))
- addNoteToMergeRequestThread :: Project -> Int -> Int -> Text -> GitLab (Either (Response ByteString) (Maybe Discussion))
- modifyMergeRequestThreadNote :: Project -> Int -> Int -> Int -> Maybe Text -> Maybe Bool -> GitLab (Either (Response ByteString) (Maybe Discussion))
- deleteMergeRequestThreadNote :: Project -> Int -> Int -> Int -> GitLab (Either (Response ByteString) (Maybe ()))
- projectCommitDiscussionItems :: Project -> Int -> GitLab (Either (Response ByteString) [Discussion])
- projectCommitDiscussionItem :: Project -> Int -> Int -> GitLab (Either (Response ByteString) (Maybe Discussion))
- createCommitThread :: Project -> Int -> Text -> Text -> Text -> Text -> PositionReference -> GitLab (Either (Response ByteString) (Maybe Discussion))
- addNoteToCommitThread :: Project -> Int -> Int -> Text -> GitLab (Either (Response ByteString) (Maybe Discussion))
- modifyCommityThreadNote :: Project -> Int -> Int -> Int -> Maybe Text -> Maybe Bool -> GitLab (Either (Response ByteString) (Maybe Discussion))
- deleteCommitThreadNote :: Project -> Int -> Int -> Int -> GitLab (Either (Response ByteString) (Maybe ()))
- data PositionReference
Issues
List project issue discussion items
projectIssueDiscussions Source #
:: Project | project |
-> Int | The IID of an issue |
-> GitLab (Either (Response ByteString) [Discussion]) |
Gets a list of all discussion items for a single issue.
Get single issue discussion item
:: Project | project |
-> Int | The IID of an issue |
-> Int | The ID of a discussion item |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Returns a single discussion item for a specific project issue.
Create new issue thread
:: Project | project |
-> Int | The IID of an issue |
-> Text | The content of the thread |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Creates a new thread to a single project issue. This is similar to creating a note but other comments (replies) can be added to it later.
Add note to existing issue thread
:: Project | project |
-> Int | The IID of an issue |
-> Int | The ID of a thread |
-> Text | The content of the note/reply |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Adds a new note to the thread. This can also create a thread from a single comment. Notes can be added to other items than comments, such as system notes, making them threads.
Modify existing issue thread note
modifyThreadNoteIssue Source #
:: Project | project |
-> Int | The IID of an issue |
-> Int | The ID of a thread |
-> Int | The ID of a thread note |
-> Text | The content of the note/reply |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Modify existing thread note of an issue.
Delete an issue thread note
deleteIssueThreadNote Source #
:: Project | project |
-> Int | The IID of an issue |
-> Int | The ID of a discussion |
-> Int | The ID of a discussion note |
-> GitLab (Either (Response ByteString) (Maybe ())) |
Deletes an existing thread note of an issue.
Snippets
List project snippet discussion items
snippetDiscussionItems Source #
:: Project | project |
-> Int | snippet ID |
-> GitLab (Either (Response ByteString) [Discussion]) |
Gets a list of all discussion items for a single snippet.
Get single snippet discussion item
snippetDiscussionItem Source #
:: Project | project |
-> Int | snippet ID |
-> Int | discussion ID |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Returns a single discussion item for a specific project snippet.
Create new snippet thread
:: Project | project |
-> Int | snippet ID |
-> Text | The content of a discussion |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Creates a new thread to a single project snippet. This is similar to creating a note but other comments (replies) can be added to it later.
Add note to existing snippet thread
addNoteToSnippetThread Source #
:: Project | project |
-> Int | snippet ID |
-> Int | discussion ID |
-> Text | The content of the note/reply |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Adds a new note to the thread.
Modify existing snippet thread note
modifySnippetThreadNote Source #
:: Project | project |
-> Int | snippet ID |
-> Int | discussion ID |
-> Int | note ID |
-> Text | The content of the note/reply |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Modify existing thread note of a snippet.
Delete a snippet thread note
deleteSnippetThreadNote Source #
:: Project | Project |
-> Int | snippet ID |
-> Int | discussion ID |
-> Int | note ID |
-> GitLab (Either (Response ByteString) (Maybe ())) |
Deletes an existing thread note of an issue.
Merge requests
List project merge request discussion items
projectMergeRequestDiscussionItems Source #
:: Project | project |
-> Int | Merge request IID |
-> GitLab (Either (Response ByteString) [Discussion]) |
Gets a list of all discussion items for a single merge request.
Get single merge request discussion item
mergeRequestDiscussionItems Source #
:: Project | project |
-> Int | Merge request IID |
-> Int | discussion ID |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Gets a list of all discussion items for a single merge request.
Create new merge request thread
createMergeRequestThread Source #
:: Project | project |
-> Int | merge request ID |
-> Text | The content of the thread |
-> Text | Base commit SHA in the source branch |
-> Text | SHA referencing commit in target branch |
-> Text | SHA referencing HEAD of this merge request |
-> PositionReference | Type of the position reference |
-> Text | File path after change |
-> Text | File path before change |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Creates a new thread to a single project merge request. This is similar to creating a note but other comments (replies) can be added to it later. See the GitLab document: https://docs.gitlab.com/ee/api/discussions.html#create-new-merge-request-thread
Line code
Resolve a merge request thread
resolveMergeRequestThread Source #
:: Project | project |
-> Int | merge request IID |
-> Int | discussion ID |
-> Bool | Resolve/unresolve the discussion |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Resolve/unresolve whole thread of a merge request.
Add note to existing merge request thread
addNoteToMergeRequestThread Source #
:: Project | project |
-> Int | merge request ID |
-> Int | discussion ID |
-> Text | The content of the note/reply |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Adds a new note to the thread. This can also create a thread from a single comment.
Modify an existing merge request thread note
modifyMergeRequestThreadNote Source #
:: Project | project |
-> Int | merge request IID |
-> Int | discussion ID |
-> Int | note ID |
-> Maybe Text | The content of the note/reply |
-> Maybe Bool | Resolve/unresolve the note |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
exactly one of body or resolved must be a Just
value
Delete a merge request thread note
deleteMergeRequestThreadNote Source #
:: Project | project |
-> Int | merge request IID |
-> Int | discussion ID |
-> Int | note ID |
-> GitLab (Either (Response ByteString) (Maybe ())) |
Deletes an existing thread note of a merge request.
Commits
List project commit discussion items
projectCommitDiscussionItems Source #
:: Project | project |
-> Int | commit ID |
-> GitLab (Either (Response ByteString) [Discussion]) |
Gets a list of all discussion items for a single commit.
Get single commit discussion item
projectCommitDiscussionItem Source #
:: Project | project |
-> Int | commit ID |
-> Int | discussion ID |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Returns a single discussion item for a specific project commit.
Create new commit thread
:: Project | project |
-> Int | commit ID |
-> Text | The content of the thread |
-> Text | SHA of the parent commit |
-> Text | SHA of the parent commit (bug in GitLab document?) |
-> Text | The SHA of this commit |
-> PositionReference | Type of the position reference |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Creates a new thread to a single project commit. This is similar to creating a note but other comments (replies) can be added to it later.
Add note to existing commit thread
addNoteToCommitThread Source #
:: Project | project |
-> Int | commit ID |
-> Int | discussion ID |
-> Text | The content of the note/reply |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Adds a new note to the thread.
Modify an existing commit thread note
modifyCommityThreadNote Source #
:: Project | project |
-> Int | commit ID |
-> Int | discussion ID |
-> Int | note ID |
-> Maybe Text | The content of the note/reply |
-> Maybe Bool | Resolve/unresolve the note |
-> GitLab (Either (Response ByteString) (Maybe Discussion)) |
Adds a new note to the thread.
Delete a commit thread note
deleteCommitThreadNote Source #
:: Project | project |
-> Int | commit ID |
-> Int | discussion ID |
-> Int | The ID of a discussion note |
-> GitLab (Either (Response ByteString) (Maybe ())) |
Deletes an existing thread note of a commit.
Types
data PositionReference Source #
Position reference for an entry in a discussion.
Instances
Show PositionReference Source # | |
Defined in GitLab.API.Discussions showsPrec :: Int -> PositionReference -> ShowS # show :: PositionReference -> String # showList :: [PositionReference] -> ShowS # |