gitlab-haskell-1.0.0.3: A Haskell library for the GitLab web API
Copyright(c) Rob Stewart Heriot-Watt University 2021
LicenseBSD3
Maintainerrobstewart57@gmail.com
Stabilitystable
Safe HaskellSafe-Inferred
LanguageHaskell2010

GitLab.API.Discussions

Description

 
Synopsis

Issues

List project issue discussion items

projectIssueDiscussions Source #

Arguments

:: 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

issueDiscussion Source #

Arguments

:: 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

createIssueThread Source #

Arguments

:: 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

addNoteToIssueThread Source #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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

createSnippetThread Source #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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

createCommitThread Source #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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 #

Arguments

:: 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.

Constructors

TextPos 
ImagePos 

Instances

Instances details
Show PositionReference Source # 
Instance details

Defined in GitLab.API.Discussions