Loading
Migrate Label event API to present the resource as Epic
What does this MR do and why?
Issue: #592686 (closed)
refactoring for ResourceLabelEvent API entities to provide support for legacy Epics
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
Run queries locally:
here are my examples with responses:
- For MR (everything stays the same)
http://127.0.0.1:3000/api/v4/projects/2/merge_requests/1/resource_label_events
[{"id":117,"user":{"id":1,"username":"root","public_email":"","name":"Administrator","state":"active","locked":false,"avatar_url":"http://127.0.0.1:3000/uploads/-/system/user/avatar/1/avatar.png","web_url":"http://127.0.0.1:3000/root"},"created_at":"2026-03-18T15:19:41.790Z","resource_type":"MergeRequest","resource_id":1,"label":{"id":15,"name":"Breffefunc"},"action":"add"}]
- For Epics (see that the Epic type is returned alongside work_item_id)
[{"id":112,"user":{"id":1,"username":"root","public_email":"","name":"Administrator","state":"active","locked":false,"avatar_url":"http://127.0.0.1:3000/uploads/-/system/user/avatar/1/avatar.png","web_url":"http://127.0.0.1:3000/root"},"created_at":"2026-03-18T15:13:46.288Z","resource_type":"Epic","resource_id":2,"label":{"id":20,"name":"Bripod","description":null,"text_color":"#FFFFFF","description_html":"","color":"#25795c","archived":false},"action":"add","resource_work_item_id":313},{"id":113,"user":{"id":1,"username":"root","public_email":"","name":"Administrator","state":"active","locked":false,"avatar_url":"http://127.0.0.1:3000/uploads/-/system/user/avatar/1/avatar.png","web_url":"http://127.0.0.1:3000/root"},"created_at":"2026-03-18T15:13:50.041Z","resource_type":"Epic","resource_id":2,"label":{"id":12,"name":"Pyneforge","description":null,"text_color":"#1F1E24","description_html":"","color":"#01f414","archived":false},"action":"add","resource_work_item_id":313},{"id":114,"user":{"id":1,"username":"root","public_email":"","name":"Administrator","state":"active","locked":false,"avatar_url":"http://127.0.0.1:3000/uploads/-/system/user/avatar/1/avatar.png","web_url":"http://127.0.0.1:3000/root"},"created_at":"2026-03-18T15:13:50.041Z","resource_type":"Epic","resource_id":2,"label":{"id":13,"name":"Pore","description":null,"text_color":"#1F1E24","description_html":"","color":"#49ee1a","archived":false},"action":"add","resource_work_item_id":313},{"id":115,"user":{"id":1,"username":"root","public_email":"","name":"Administrator","state":"active","locked":false,"avatar_url":"http://127.0.0.1:3000/uploads/-/system/user/avatar/1/avatar.png","web_url":"http://127.0.0.1:3000/root"},"created_at":"2026-03-18T15:13:52.923Z","resource_type":"Epic","resource_id":2,"label":{"id":13,"name":"Pore","description":null,"text_color":"#1F1E24","description_html":"","color":"#49ee1a","archived":false},"action":"remove","resource_work_item_id":313}]
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #592686 (closed)
Edited by Tetiana Chupryna