Skip to content

Commit

Permalink
Adds strategy config, closes #39
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Jun 7, 2019
1 parent d37b0f8 commit 5d6408d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ pip:

npm_and_yarn:
extends: .dependabot
variables:
DEPENDABOT_UPDATE_STRATEGY: 'bump_version'
only:
variables:
- $PACKAGE_MANAGER_SET =~ /(\bnpm|yarn\b)/
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ This configuration is best to be setup inside CI schedule's environment.
- `DEPENDABOT_ASSIGNEE_GITLAB_ID` - (optional) Gitlab user id to assign to merge requests
- `DEPENDABOT_GITLAB_APPROVE_MERGE` - (optional) setup to `true` if you want our bot to approve your merge requests
- `DEPENDABOT_GITLAB_AUTO_MERGE` - (optional) setup to `true` if you want to auto merge this request

### Per package manager

- `DEPENDABOT_UPDATE_STRATEGY` - (optional) change how each package manager updates your dependency versions, see list of allowed values [here](https://github.com/wemake-services/kira-dependencies/issues/39)
3 changes: 3 additions & 0 deletions update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@
dependency: dep,
dependency_files: files,
credentials: credentials,
# See lists of update strategies here:
# https://github.com/wemake-services/kira-dependencies/issues/39
requirements_update_strategy: ENV['DEPENDABOT_UPDATE_STRATEGY'] || nil
)

next if checker.up_to_date?
Expand Down

0 comments on commit 5d6408d

Please sign in to comment.