pull_request_rules:
  - name: backport patches to 3.0 maint branch
    conditions:
      - base=master
      - label=backport-to-3.0
    actions:
      backport:
        branches:
          - maint-3.0.x
  - name: backport patches to 3.1 maint branch
    conditions:
      - base=master
      - label=backport-to-3.1
    actions:
      backport:
        branches:
          - maint-3.1.x
  - name: backport patches to 3.2 maint branch
    conditions:
      - base=master
      - label=backport-to-3.2
    actions:
      backport:
        branches:
          - maint-3.2.x
  - name: label PRs to 3.2 maint branch
    conditions:
      - base=maint-3.2.x
      - -closed
    actions:
      label:
        add: [3.2.x]
  - name: backport patches to 2.11 maint branch
    conditions:
      - base=master
      - label=backport-to-2.11
    actions:
      backport:
        branches:
          - release-2.11

pull_request_rules:
  # Backport to maint(version) branches
  - name: backport patches to 3.0 maint branch
    conditions:
      - base=master
      - label=backport-to-3.0
    actions:
      backport:
        branches:
          - maint-3.0.x
  - name: backport patches to 3.1 maint branch
    conditions:
      - base=master
      - label=backport-to-3.1
    actions:
      backport:
        branches:
          - maint-3.1.x
  - name: backport patches to 3.2 maint branch
    conditions:
      - base=master
      - label=backport-to-3.2
    actions:
      backport:
        branches:
          - maint-3.2.x
  - name: backport patches to 2.11 maint branch
    conditions:
      - base=master
      - label=backport-to-2.11
    actions:
      backport:
        branches:
          - release-2.11
  # Add version labels to open PRs
  - name: label PRs master with 3.3.x
    conditions:
      - base=master
      - -closed
    actions:
      label:
        add: [3.3.x]
  - name: label PRs to 3.2 maint branch
    conditions:
      - base=maint-3.2.x
      - -closed
    actions:
      label:
        add: [3.2.x]
  - name: label PRs to 3.1 maint branch
    conditions:
      - base=maint-3.1.x
      - -closed
    actions:
      label:
        add: [3.1.x]
Add auto-labeling for 3.3 and 3.1
Add auto-labeling for 3.3 and 3.1
