API around merge request and commit discussions
We want to extend our existing API for:
- Commit comments
- Merge Request comments
It should support creating, replying to, listing, editing, resolving (on MRs), and deleting discussions, both on the diff (on MRs and commits) and not on the diff (on all 4 noteable types, see https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/7527). For Merge Requests and Commits, we also want to support adding 'new' DiffNote
s, not just the LegacyDiffNote
s the existing commit comments API allows creating.
Original description
MergeRequests and commits don't just have a chronological stream of notes (comments), they can also have discussions on lines in the diff, that are technically just notes, but that are grouped, displayed in a special way, and have certain special actions that can be done to them (resolve/unresolve, as of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5022). We currently don't expose these in the API, and don't allow comments to easily be added to an existing discussion instead of the MR/commit as a whole.
This is closely related to the API for diff notes (https://gitlab.com/gitlab-org/gitlab-ce/issues/16550), because diff notes always show up in discussions.