queue_rules:
  - name: default
    # all required tests need to go here
    merge_conditions:
      - check-success=tests on macos
      - check-success=tests on ubuntu
      - check-success=installer test on macos
      - check-success=installer test on ubuntu
      - check-success=vm_tests
    batch_size: 5

pull_request_rules:
  - name: merge using the merge queue
    conditions:
      - base~=master|.+-maintenance
      - label~=merge-queue|dependencies
    actions:
      queue: {}

# The rules below will first create backport pull requests and put those in a merge queue.

  - name: backport patches to 2.18
    conditions:
      - label=backport 2.18-maintenance
    actions:
      backport:
        branches:
          - 2.18-maintenance
        labels:
          - automatic backport
          - merge-queue

  - name: backport patches to 2.19
    conditions:
      - label=backport 2.19-maintenance
    actions:
      backport:
        branches:
          - 2.19-maintenance
        labels:
          - automatic backport
          - merge-queue

  - name: backport patches to 2.20
    conditions:
      - label=backport 2.20-maintenance
    actions:
      backport:
        branches:
          - 2.20-maintenance
        labels:
          - automatic backport
          - merge-queue

  - name: backport patches to 2.21
    conditions:
      - label=backport 2.21-maintenance
    actions:
      backport:
        branches:
          - 2.21-maintenance
        labels:
          - automatic backport
          - merge-queue

  - name: backport patches to 2.22
    conditions:
      - label=backport 2.22-maintenance
    actions:
      backport:
        branches:
          - 2.22-maintenance
        labels:
          - automatic backport
          - merge-queue

  - name: backport patches to 2.23
    conditions:
      - label=backport 2.23-maintenance
    actions:
      backport:
        branches:
          - 2.23-maintenance
        labels:
          - automatic backport
          - merge-queue

  - name: backport patches to 2.24
    conditions:
      - label=backport 2.24-maintenance
    actions:
      backport:
        branches:
          - "2.24-maintenance"
        labels:
          - automatic backport
          - merge-queue

  - name: backport patches to 2.25
    conditions:
      - label=backport 2.25-maintenance
    actions:
      backport:
        branches:
          - "2.25-maintenance"
        labels:
          - automatic backport
          - merge-queue

  - name: backport patches to 2.26
    conditions:
      - label=backport 2.26-maintenance
    actions:
      backport:
        branches:
          - "2.26-maintenance"
        labels:
          - automatic backport
          - merge-queue

  - name: backport patches to 2.27
    conditions:
      - label=backport 2.27-maintenance
    actions:
      backport:
        branches:
          - "2.27-maintenance"
        labels:
          - automatic backport
          - merge-queue

  - name: backport patches to 2.28
    conditions:
      - label=backport 2.28-maintenance
    actions:
      backport:
        branches:
          - "2.28-maintenance"
        labels:
          - automatic backport
          - merge-queue
