pull_request_rules:
  - name: port main patches to stable branch
    conditions:
      - base=main
      - label=port-to-stable
    actions:
      backport:
        branches:
          - stable

  - name: port main patches to oldstable branch
    conditions:
      - base=main
      - label=port-to-oldstable
    actions:
      backport:
        branches:
          - oldstable

  - name: port stable patches to main branch
    conditions:
      - base=stable
      - label=port-to-main
    actions:
      backport:
        branches:
          - main

  - name: port stable patches to oldstable branch
    conditions:
      - base=stable
      - label=port-to-oldstable
    actions:
      backport:
        branches:
          - oldstable

  - name: port oldstable patches to main branch
    conditions:
      - base=oldstable
      - label=port-to-main
    actions:
      backport:
        branches:
          - main

  - name: port oldstable patches to stable branch
    conditions:
      - base=oldstable
      - label=port-to-stable
    actions:
      backport:
        branches:
          - stable
