Skip to content

Issue to MR flow

  • Tier: Premium, Ultimate
  • Add-on: GitLab Duo Core, Pro, or Enterprise
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
  • Status: Beta

Version history

  • Introduced as a beta in GitLab 18.3 with a flag named duo_workflow_in_ci. Disabled by default. The duo_workflow flag must also be enabled.

The availability of this feature is controlled by a feature flag. For more information, see the history.

The Issue to MR flow streamlines the process of converting issues into actionable merge requests. This flow:

  • Analyzes the issue description and requirements.
  • Opens a draft merge request that's linked to the original issue.
  • Creates a development plan based on the issue details.
  • Creates code structure or implementation.
  • Updates the merge request with the code changes.

This flow is available in the GitLab UI only.

Prerequisites

Before you can create a merge request from an issue, you must have:

Use the Issue to MR flow

To use the Issue to MR flow:

  1. On the left sidebar, select Search or go to and find your project.
  2. Select Plan > Issues.
  3. Below the issue header, select Generate MR with Duo.
  4. Monitor progress by selecting Automate > Sessions.
  5. When the pipeline has successfully executed, a link to the merge request is displayed in the issue's activity section.
  6. Review the merge request and make changes as needed.

Best practices

  • Keep the issues well-scoped. Break down complex tasks into smaller, focused, and action-oriented requests.
  • Specify exact file paths.
  • Write specific acceptance criteria.
  • Include code examples of existing patterns to maintain consistency.

Example

This example shows a well-crafted issue that can be used to generate a merge request.

## Description
The users endpoint currently returns all users at once,
which will cause performance issues as the user base grows.
Implement cursor-based pagination for the `/api/users` endpoint
to handle large datasets efficiently.

## Implementation plan
Add pagination to GET /users API endpoint.
Include pagination metadata in /users API response (per_page, page).
Add query parameters for per page size limit (default 5, max 20).

#### Files to modify
- `src/api/users.py` - Add pagination parameters and logic.
- `src/models/user.py` - Add pagination query method.
- `tests/api/test_users_api.py` - Add pagination tests.

## Acceptance criteria
- Accepts page and per_page query parameters (default: page=5, per_page=10).
- Limits per_page to a maximum of 20 users.
- Maintains existing response format for user objects in data array.