Loading
Add linking between workflows and merge requests
What does this MR do and why?
Adds linking between workflows and merge requests:
- Creates a link between workflows and the Merge Request that they were created from (link_type:
source) - Creates a link between Merge Requests that are created by workflows (link_type:
created)
References
How to set up and validate locally
- Go to a Merge Request in your GDK
- Ask
developerto create a new merge requests, e.g.@duo-developer-gitlab-duo - Create a new MR that adds a placeholder todo.txt - In your rails console, check that the links were created:
[1] pry(main)> workflow = Ai::DuoWorkflows::Workflow.last
[2] pry(main)> workflow.linked_merge_requests
...
=> [#<MergeRequest id:1936 gitlab-duo/ai-assist!399>, #<MergeRequest id:2314 gitlab-duo/ai-assist!437>]
[3] pry(main)> workflow.merge_request_links
...
=> [#<Ai::DuoWorkflows::WorkflowMergeRequest:0x000000013dbb1028
id: 1,
workflow_id: 4551,
merge_request_id: 1936,
project_id: 22,
namespace_id: nil,
created_at: "2026-06-26 19:53:28.847059000 +0000",
updated_at: "2026-06-26 19:53:28.847059000 +0000",
link_type: "source">,
#<Ai::DuoWorkflows::WorkflowMergeRequest:0x000000013899bcc0
id: 2,
workflow_id: 4551,
merge_request_id: 2314,
project_id: 22,
namespace_id: nil,
created_at: "2026-06-26 19:55:19.094976000 +0000",
updated_at: "2026-06-26 19:55:19.094976000 +0000",
link_type: "created">]- Confirm the links above match the links in your GDK
- Confirm the
sourceMR is where you added the comment, and thecreatedMR is the one created bydeveloper.
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.
Edited by Roman Eisner