Add support for attributed_author in discussions
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
Add support for attributed_author in discussions
- Migration to add
attributed_author_nameandattributed_author_emailtonote_metadata - Updated the Discussion API to support
attributed_author. - Modified the response structure to return
attributed_authordetails when applicable. - Updated views to display
attributed_authorwhen available.
Issue: #521627 (closed)
Screenshots or screen recordings
Screen_Recording_2025-02-27_at_11.31.08
How to set up and validate locally
- Call the create thread endpoint POST /projects/:id/merge_requests/:merge_request_iid/discussions
- Pass the new
attributed_authorhas in params
...
"attributed_author": {
"name": "Automation Tool",
"email": "email-to-get-gravatar@example.com"
},
...
- Check the discussion thread has been created with the attributed author name and avatar showing up.
- Check the text (On behalf of user) is also showing (user = the owner of the api token)
Edited by Ivane Gkomarteli