How can I change my dependabot config to exclude major versions

Viewed 2116

This is my dependabot config, is there any way to exclude major version updates and just have minor, patch and security updates? If so what would I need to change?

version: 1
update_configs:
  - package_manager: 'javascript'
    commit_message:
      include_scope: true
      prefix: 'chore'
    default_reviewers:
      - someUser
    default_labels:
      - 'dependencies'
    directory: '/'
    target_branch: 'develop'
    update_schedule: 'live'
2 Answers

You can do something like this. We use this to ignore certain versions of certain dependencies.

- package-ecosystem: gomod
  directory: "/"
  schedule:
    interval: daily
    time: "04:00"
  open-pull-requests-limit: 10
  reviewers:
  - xh3b4sd
  ignore:
  - dependency-name: k8s.io/*
    versions:
    - ">=0.19.0"

One problem that I currently try to figure out is how to actually resume updates automatically once they have been ignored. Right now it looks like you have to trigger them manually, which is quite some work when you have many repositories.

Related