Skip to content

Add support for attributed_author in discussions

What does this MR do and why?

Add support for attributed_author in discussions

  • Migration to add attributed_author_name and attributed_author_email to note_metadata
  • Updated the Discussion API to support attributed_author.
  • Modified the response structure to return attributed_author details when applicable.
  • Updated views to display attributed_author when available.

Issue: #521627 (closed)

Screenshots or screen recordings

Screen_Recording_2025-02-27_at_11.31.08

How to set up and validate locally

  1. Call the create thread endpoint POST /projects/:id/merge_requests/:merge_request_iid/discussions
  2. Pass the new attributed_author has in params
       ...
       "attributed_author": {
          "name": "Automation Tool",
          "email": "email-to-get-gravatar@example.com"
       },
       ...
  1. Check the discussion thread has been created with the attributed author name and avatar showing up.
  2. Check the text (On behalf of user) is also showing (user = the owner of the api token)
Edited by Ivane Gkomarteli

Merge request reports

Loading