Discussions¶
Discussions organize the notes in threads. See the Notes chapter for more information about notes.
Discussions are available for project issues, merge requests, snippets and commits.
Reference¶
v4 API:
Issues:
gitlab.v4.objects.ProjectIssue.notes
MergeRequests:
gitlab.v4.objects.ProjectMergeRequest.notes
Snippets:
GitLab API: https://docs.gitlab.com/ce/api/discussions.html
Examples¶
List the discussions for a resource (issue, merge request, snippet or commit):
Get a single discussion:
You can access the individual notes in the discussion through the notes attribute. It holds a list of notes in chronological order:
Note
The notes are dicts, not objects.
You can add notes to existing discussions:
You can get and update a single note using the *DiscussionNote resources:
Create a new discussion:
You can comment on merge requests and commit diffs. Provide the position dict to define where the comment should appear in the diff:
Resolve / unresolve a merge request discussion:
Delete a comment: