[go: up one dir, main page]

Skip to content

Events REST API does not return DiscussionNote when target_type=note

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

In Project Events REST API, 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 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>'
  1. Observe that results are returned that have target_type as Note
  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' --header 'Authorization: Bearer <token>'
  1. 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

image

Edited by 🤖 GitLab Bot 🤖