Events REST API does not return DiscussionNote when target_type=note
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=466426) </details> <!--IssueSummary end--> ### Summary In [Project Events REST API](https://docs.gitlab.com/ee/api/events.html#list-a-projects-visible-events), if I specify `target_type=note` and `action=commented` in params, it does not return DiscussionNotes (thread comments) on Merge Reqeusts. If I remove `target_type=note`, only then DiscussionNotes show up. Additionally, `DiscussionNote` is not a supported value for the [param](https://docs.gitlab.com/ee/api/events.html#target-types) `target_type` ### Steps to reproduce 1. Create some merge requests in a project. Add general comments and start discussion threads 2. Make a request to the project events API `/projects/:project_id/events?target_type=note&action=commented` ``` curl 'https://gitlab.com/api/v4/projects/:project_id/events?action=commented&target_type=note' --header 'Authorization: Bearer <token>' ``` 3. Observe that results are returned that have `target_type` as `Note` 4. Make a request to the project events API `/projects/:project_id/events?target_type=note&action=commented` ``` curl 'https://gitlab.com/api/v4/projects/:project_id/events?action=commented' --header 'Authorization: Bearer <token>' ``` 5. Observe that results are also returned that have `target_type` as `DiscussionNote` ### Example Project https://gitlab.com/gitlab-org/gitlab ### What is the current *bug* behavior? Only general comments are returned with `target_type=note` ### What is the expected *correct* behavior? Comments in discussion threads should also be returned when `target_type=note` ### Relevant logs and/or screenshots ![image](/uploads/61a1c9ed16688bd9bb9f421ec1cd2798/image.png){width=695 height=422} ![image](/uploads/a6bc5cce7e01b02c9efb330a77110a9e/image.png){width=700 height=422}
issue