version: 2
labels:
  - label: 'type/chore'
    branch: '^chore/.*'
    title:  '^\s*.*?\schore(?:(.+))?!?:'

  - label: 'type/fix'
    branch: '^fix/.*'
    title: '^\s*.*?\sfix(?:(.+))?!?:'

  - label: 'type/feat'
    branch: '^feat/.*'
    title: '^\s*.*?\sfeat(?:(.+))?!?:'

  - label: 'type/breaking'
    body: '(?i)breaking.*'

  - label: 'type/docs'
    branch: '^docs/.*'
    title: '^\s*.*?\sdocs(?:(.+))?!?:'
    branch: '^docs/.*'
    files:
     - '**/*.md$'
     - '**/*.mdx$'

  - label: 'type/ci'
    branch: '^ci/.*'  
    title: '^\s*.*?\sci(?:(.+))?!?:'
    files:
     - '.github/.+'

  - label: 'type/build'
    branch: '^dependabot/.*'
    title: '^\s*.*?\sbuild(?:(.+))?!?:'

  - label: 'type/perf'
    title: '^\s*.*?\sperf(?:(.+))?!?:'

  - label: 'mergeable/false'
    mergeable: False

  - label: 'usr/dependabot'
    branch: '^dependabot/.*' 
    authors: 
      - 'dependabot[bot]'

  - label: 'scope/back-end'
    files:
     - 'server.Dockerfile'  
  
  - label: 'scope/base'
    files:
     - 'base.Dockerfile'

  - label: 'scope/ffmpeg'
    files:
     - 'ffmpeg.Dockerfile'

  - label: 'scope/recorder'
    files:
     - 'recorder.Dockerfile'
     
  - label: 'scope/relay'
    files:
     - 'relay.Dockerfile'

  - label: 'scope/front-end'
    files:
     - 'apps/www/.+'

  - label: 'pkg/www'
    files:
     - 'apps/www/.+'

  - label: 'scope/git'
    files:
     - '**/.gitignore$'
     - '.github/.+'

  - label: "size/xs"
    size:
        below: 10
        exclude-files: ["pnpm-lock.yml","yarn.lock"]

  - label: "size/s"
    size:
        above: 9
        below: 100
        exclude-files: ["pnpm-lock.yml","yarn.lock"]  
        
  - label: "size/m"
    size:
        above: 49
        below: 200
        exclude-files: ["pnpm-lock.yml","yarn.lock"]  
        
  - label: "size/l"
    size:
        above: 199
        below: 500
        exclude-files: ["pnpm-lock.yml","yarn.lock"]  
        
  - label: "size/xl"
    size:
        above: 499
        below: 1000
        exclude-files: ["pnpm-lock.yml","yarn.lock"]

  - label: "size/xxl"
    size:
        above: 999
        exclude-files: ["pnpm-lock.yml","yarn.lock"]

  - label: "usr/wanjohi"
    authors: ['wanjohiryan']
    
  - label: "usr/unknown"
    negate: True
    authors: ['wanjohiryan','apps/dependabot','dependabot', 'dependabot[bot]']