> ## Documentation Index
> Fetch the complete documentation index at: https://docs.diversion.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List open merges

> Lists all open merge operations for a repository, optionally filtered by `base_id` (target branch) and `other_id` (source branch/commit).

**Sorting:**
Results are sorted with the current user's merges first, then by creation time.

**Information included:**
Each merge includes basic information without conflict details.

**Requirements:**
Requires READ access to the repository.




## OpenAPI

````yaml get /repos/{repo_id}/merges
openapi: 3.0.3
info:
  title: Diversion Core API
  description: >-
    Definition of the Core API used to access low-level functionality of
    Diversion
  version: 0.2.0
servers:
  - url: https://api.diversion.dev/v0
    description: Base endpoint
security: []
paths:
  /repos/{repo_id}/merges:
    parameters:
      - $ref: '#/components/parameters/RepoParam'
    get:
      tags:
        - Repository Merge Manipulation
      summary: Retrieve conflicted merges in this repo
      operationId: src.handlersv2.merge.list_open_merges
      parameters:
        - $ref: '#/components/parameters/BaseRefParam'
        - $ref: '#/components/parameters/OtherRefParam'
      responses:
        '200':
          $ref: '#/components/responses/MergeList'
      security:
        - OAuth2:
            - coreapi/read
        - OAuth2:
            - coreapi/write
components:
  parameters:
    RepoParam:
      in: path
      name: repo_id
      required: true
      schema:
        type: string
        example: example_id
        minLength: 3
        maxLength: 128
      description: >-
        The repo ID of the repository. Repo _name_ can be used instead of the
        ID, but usage of ID for permanent linking and API requests is preferred.
    BaseRefParam:
      in: query
      name: base_id
      description: A reference to a base unto which changes will be applied
      schema:
        type: string
        example: example_id
        minLength: 3
        maxLength: 128
    OtherRefParam:
      in: query
      name: other_id
      description: A reference to a source version from which changes will be taken
      schema:
        type: string
        example: example_id
        minLength: 3
        maxLength: 128
  responses:
    MergeList:
      description: Success
      content:
        application/json:
          schema:
            type: object
            properties:
              object:
                type: string
                enum:
                  - Merge
              items:
                type: array
                items:
                  $ref: '#/components/schemas/Merge'
            required:
              - object
              - items
  schemas:
    Merge:
      description: Describes a merge in progress with conflicts
      type: object
      properties:
        id:
          type: string
        repo_id:
          type: string
        user:
          $ref: '#/components/schemas/User'
        base_ref:
          type: string
        base_commit:
          type: string
        other_ref:
          type: string
        other_commit:
          type: string
        ancestor_commit:
          type: string
      required:
        - id
        - repo_id
        - user
        - base_ref
        - base_commit
        - other_ref
        - other_commit
        - ancestor_commit
    User:
      description: User details
      type: object
      properties:
        image:
          type: string
          description: URL of the user image
        email:
          type: string
          format: email
        full_name:
          type: string
        id:
          type: string
        name:
          type: string
      required:
        - id
  securitySchemes:
    OAuth2:
      type: oauth2
      x-tokenInfoFunc: src.token_info.token_auth
      description: This API uses OAuth 2 with the implicit grant flow
      flows:
        implicit:
          authorizationUrl: https://auth.diversion.dev/oauth2/authorize
          scopes:
            coreapi/read: Operations with no possible side-effects
            coreapi/write: Modifying operations
            coreapi/admin: >-
              Organizational operations like adding a repo or changing repo
              properties

````