queue_rules:
  - name: default
    queue_conditions:
      - "#approved-reviews-by>=1"
      - base=main
      - label=automerge
    commit_message_template: |
      {{ title }} (#{{ number }})
      {{ body }}
    merge_conditions:
      - "#approved-reviews-by>=1"
      - base=main
      - label=automerge
    merge_method: squash

pull_request_rules:
  - name: backport patches to v0.2.x callbacks ibc-go v7.3.x branch
    conditions:
      - base=main
      - label=backport-callbacks-to-v0.2.x+ibc-go-v7.3.x
    actions:
      backport:
        branches:
          - callbacks/release/v0.2.x+ibc-go-v7.3.x
  - name: backport patches to v0.2.x callbacks ibc-go v8.0.x branch
    conditions:
      - base=main
      - label=backport-callbacks-to-v0.2.x+ibc-go-v8.0.x
    actions:
      backport:
        branches:
          - callbacks/release/v0.2.x+ibc-go-v8.0.x
  - name: backport patches to v0.4.x wasm ibc-go v7.4.x & wasmvm 1.5.x branch
    conditions:
      - base=main
      - label=backport-wasm-v0.4.x+ibc-go-v7.4.x-wasmvm-v1.5.x
    actions:
      backport:
        branches:
          - 08-wasm/release/v0.4.x+ibc-go-v7.4.x-wasmvm-v1.5.x
  - name: backport patches to v0.5.x wasm ibc-go v8.4.x & wasmvm 2.1.x branch
    conditions:
      - base=main
      - label=backport-wasm-v0.5.x+ibc-go-v8.4.x-wasmvm-v2.1.x
    actions:
      backport:
        branches:
          - 08-wasm/release/v0.5.x+ibc-go-v8.4.x-wasmvm-v2.1.x
  - name: backport patches to v7.10.x branch
    conditions:
      - base=main
      - label=backport-to-v7.10.x
    actions:
      backport:
        branches:
          - release/v7.10.x
  - name: backport patches to v8.7.x branch
    conditions:
      - base=main
      - label=backport-to-v8.7.x
    actions:
      backport:
        branches:
          - release/v8.7.x
  - name: backport patches to v10.2.x branch
    conditions:
      - base=main
      - label=backport-to-v10.2.x
    actions:
      backport:
        branches:
          - release/v10.2.x
  - name: backport patches to v10.3.x branch
    conditions:
      - base=main
      - label=backport-to-v10.3.x
    actions:
      backport:
        branches:
          - release/v10.3.x
  - name: automerge to main with label automerge and branch protection passing
    conditions: []
    actions:
      queue:
