Skip to content

Commit

Permalink
fix: missing dependabot updates
Browse files Browse the repository at this point in the history
Problem:
Since ebe7d3c, dependabot does not send
updates for packages not matching a group. For example, in the
"telemetry/vscode/" directory it will only update `jest` and `@types`
dependencies. Other deps won't be updated.

Hint: #533 (comment)

Solution:
- Review the inscrutable documentation: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
- Reference examples on github via: https://github.com/search?q=path%3Adependabot.yml+groups+all&type=code
- Remove `dependency-type` directive.
- Try `allow: dependency-name: '*'` directive.
    - If this doesn't work, later try a "catch-all" group. Note that `groups` are evaluated as "first wins".
- Note: intentionally _not_ using ["allow … all" directive](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#allow);
  it enables updates for _transitive_ dependencies, it's unrelated to "groups":
  ```
  allow:
    - dependency-type: 'all'
  ```
  • Loading branch information
justinmk3 committed Jan 11, 2024
1 parent a38e9a3 commit 29b481e
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,55 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
# Documentation for configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates

version: 2
updates:
- package-ecosystem: 'npm'
target-branch: 'main' # Avoid updates to "staging".
commit-message:
prefix: 'deps'
directory: '/telemetry/vscode'
schedule:
interval: 'daily'
allow:
- dependency-name: '*'
groups:
jest:
dependency-type: 'development'
patterns:
- '*jest'
types:
dependency-type: 'development'
patterns:
- '@types/*'
# other: # Catch-all to ensure dependabot updates other dependencies...
# patterns:
# - '*'

- package-ecosystem: 'gradle'
target-branch: 'main' # Avoid updates to "staging".
commit-message:
prefix: 'deps'
directory: '/telemetry/jetbrains'
schedule:
interval: 'daily'

- package-ecosystem: 'nuget'
target-branch: 'main' # Avoid updates to "staging".
commit-message:
prefix: 'deps'
directory: '/telemetry/csharp'
schedule:
interval: 'daily'
allow:
- dependency-name: '*'
groups:
xunit:
dependency-type: 'development'
patterns:
- 'xunit'
- 'xunit.runner.visualstudio'
- 'xunit*'
- 'xunit.*'
update-types:
- 'minor'
# other: # Catch-all to ensure dependabot updates other dependencies...
# patterns:
# - '*'

0 comments on commit 29b481e

Please sign in to comment.