When a commit appears in several projects commit comments are shared across projects
Summary
I have a project on my GitLab (8.16.3) instance that I have forked. Id of the original project is 4
and id of the forked project is 6
.
I added some comments to a given commit on the original project and added some (different) comments on the same commit on the forked project.
On GitLab UI the right comments are displayed on the right project. But when I call the API comments posted on both projects appear in both projects: api/v3/projects/4/repository/commits/a8216c428916f0f4c8d6c600a1e95e0ac16f4ea4/comments
and api/v3/projects/6/repository/commits/a8216c428916f0f4c8d6c600a1e95e0ac16f4ea4/comments
return the exact same result.
I'm using the commit comment API to comment from an external service. I test if there is already a comment from a given user on the commit before commenting from my service but due to this confusing API response result of my test is wrong all the time...
And in the note
object I do not see any way to differenciate between project so... Could you confirm that this is a bug ?
Steps to reproduce
Fork a project, comment in both original and forked project on a commit that appear in both project. Get the comments on the commit using GET /projects/:id/repository/commits/:sha/comments
on both projects. You get comments added on both projects in both responses.
Expected behavior
Get only comments added on the commit in the project given as path parameter.