version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"
      time: "06:00"
      timezone: "America/Chicago"
    labels: []
    commit-message:
      prefix: "ci"
    ignore:
      # These actions deliver the latest versions by updating the major
      # release tag, so ignore minor and patch versions
      - dependency-name: "actions/*"
        update-types:
          - version-update:semver-minor
          - version-update:semver-patch
      - dependency-name: "Apple-Actions/import-codesign-certs"
        update-types:
          - version-update:semver-minor
          - version-update:semver-patch
      - dependency-name: "marocchino/sticky-pull-request-comment"
        update-types:
          - version-update:semver-minor
          - version-update:semver-patch
    groups:
      github-actions:
        patterns:
          - "*"

  - package-ecosystem: "gomod"
    directory: "/"
    schedule:
      interval: "weekly"
      time: "06:00"
      timezone: "America/Chicago"
    commit-message:
      prefix: "chore"
    labels: []
    open-pull-requests-limit: 15
    groups:
      x:
        patterns:
          - "golang.org/x/*"
    ignore:
      # Ignore patch updates for all dependencies
      - dependency-name: "*"
        update-types:
          - version-update:semver-patch

  # Update our Dockerfile.
  - package-ecosystem: "docker"
    directory: "/scripts/"
    schedule:
      interval: "weekly"
      time: "06:00"
      timezone: "America/Chicago"
    commit-message:
      prefix: "chore"
    labels: []
    ignore:
      # We need to coordinate terraform updates with the version hardcoded in
      # our Go code.
      - dependency-name: "terraform"

  - package-ecosystem: "npm"
    directories:
      - "/site"
      - "/offlinedocs"
    schedule:
      interval: "monthly"
      time: "06:00"
      timezone: "America/Chicago"
    reviewers:
      - "coder/ts"
    commit-message:
      prefix: "chore"
    labels: []
    groups:
      xterm:
        patterns:
          - "@xterm*"
      mui:
        patterns:
          - "@mui*"
      react:
        patterns:
          - "react"
          - "react-dom"
          - "@types/react"
          - "@types/react-dom"
      emotion:
        patterns:
          - "@emotion*"
        exclude-patterns:
          - "jest-runner-eslint"
      jest:
        patterns:
          - "jest"
          - "@types/jest"
      vite:
        patterns:
          - "vite*"
          - "@vitejs/plugin-react"
    ignore:
      # Ignore major version updates to avoid breaking changes
      - dependency-name: "*"
        update-types:
          - version-update:semver-major
    open-pull-requests-limit: 15
