queue_rules:
  - name: default
    queue_conditions:
      - "#approved-reviews-by>=1"
      - "#changes-requested-reviews-by=0"
      - base=main
      - label=checkin-needed
      - check-success=Decision Task
      - check-success=run-tests
      - check-success=ios-artifacts
      - check-success=clippy
      - check-success=check-formatting
      - "#check-success>=5"
      - "#check-pending=0"
      - "#check-stale=0"
      - "#check-failure=0"
    merge_conditions:
      # Conditions to get out of the queue (= merged)
      - check-success=Decision Task
      - check-success=run-tests
      - check-success=check-formatting
      - "#check-success>=5" # we should always have at least this many checks
      - "#check-pending=0"
      - "#check-stale=0"
      - "#check-failure=0"
    merge_method: rebase

pull_request_rules:
  - name: remove outdated reviews for non-core authors
    conditions:
      - base=main
      - author!=@mozilla/application-services
      - author!=@mozilla/application-services-collaborators
      - author!=@mozilla/release-management
    actions:
      dismiss_reviews:
        message: The pull request has been modified, dismissing previous reviews.
      label:
        remove:
          - checkin-needed
  - name: automatic merge for main
    conditions: []
    actions:
      queue:
