You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file.md
+99-1Lines changed: 99 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -46,10 +46,14 @@ For a real-world example of `dependabot.yml` file, see [{% data variables.produ
46
46
The top-level `updates` key is mandatory. You use it to configure how {% data variables.product.prodname_dependabot %} updates the versions or your project's dependencies. Each entry configures the update settings for a particular package manager. You can use the following options.
47
47
48
48
{% data reusables.dependabot.configuration-options %}
{% data reusables.dependabot.directory-directories-required %}
52
+
53
+
{% endif %}
50
54
These options fit broadly into the following categories.
51
55
52
-
* Essential set up options that you must include in all configurations: [`package-ecosystem`](#package-ecosystem), [`directory`](#directory),[`schedule.interval`](#scheduleinterval).
56
+
* Essential set up options that you must include in all configurations: [`package-ecosystem`](#package-ecosystem), [`directory`](#directory){% ifversion dependabot-updates-multidirectory-support %} or [`directories`](#directories){% endif %},[`schedule.interval`](#scheduleinterval).
53
57
* Options to customize the update schedule: [`schedule.time`](#scheduletime), [`schedule.timezone`](#scheduletimezone), [`schedule.day`](#scheduleday).
54
58
* Options to control which dependencies are updated: [`allow`](#allow), {% ifversion dependabot-version-updates-groups %}[`groups`](#groups),{% endif %} [`ignore`](#ignore), [`vendor`](#vendor).
55
59
* Options to add metadata to pull requests: [`reviewers`](#reviewers), [`assignees`](#assignees), [`labels`](#labels), [`milestone`](#milestone).
@@ -117,6 +121,14 @@ updates:
117
121
118
122
**Required**. You must define the location of the package manifests for each package manager (for example, the _package.json_ or _Gemfile_). You define the directory relative to the root of the repository for all ecosystems except {% data variables.product.prodname_actions %}.
{% data reusables.dependabot.directories-option-overview %} For more information, see [`directories`](#directories).
127
+
128
+
{% data reusables.dependabot.directory-directories-required %}
129
+
130
+
{% endif %}
131
+
120
132
For {% data variables.product.prodname_actions %}, you do not need to set the directory to `/.github/workflows`. Configuring the key to `/` automatically instructs {% data variables.product.prodname_dependabot %} to search the `/.github/workflows` directory, as well as the _action.yml_ / _action.yaml_ file from the root directory.
**Required**. You must define the locations of the package manifests for each package manager. You define directories relative to the root of the repository for all ecosystems except {% data variables.product.prodname_actions %}. The `directories` option contains a list of strings representing directories.
163
+
164
+
{% data reusables.dependabot.directory-directories-required %}
165
+
166
+
```yaml
167
+
# Specify locations of manifest files for each package manager using `directories`
168
+
169
+
version: 2
170
+
updates:
171
+
- package-ecosystem: "bundler"
172
+
directories:
173
+
- "/frontend"
174
+
- "/backend"
175
+
- "/admin"
176
+
schedule:
177
+
interval: "weekly"
178
+
```
179
+
180
+
{% data reusables.dependabot.directories-option-overview %}
181
+
182
+
{% data reusables.dependabot.directory-vs-directories-guidance %}
183
+
184
+
```yaml
185
+
# Specify locations of manifest files for each package manager using both `directories` and `directory`
186
+
187
+
version: 2
188
+
updates:
189
+
- package-ecosystem: "bundler"
190
+
directories:
191
+
- "/frontend"
192
+
- "/backend"
193
+
- "/admin"
194
+
schedule:
195
+
interval: "weekly"
196
+
- package-ecosystem: "bundler"
197
+
directory: "/"
198
+
schedule:
199
+
interval: "daily"
200
+
```
201
+
202
+
>[!TIP]
203
+
> The `directories` key supports globbing and the wildcard character `*`. These features are not supported by the `directory` key.
204
+
205
+
```yaml
206
+
# Specify the root directory and directories that start with "lib-", using globbing, for locations of manifest files
207
+
208
+
version: 2
209
+
updates:
210
+
- package-ecosystem: "composer"
211
+
directories:
212
+
- "/"
213
+
- "/lib-*"
214
+
schedule:
215
+
interval: "weekly"
216
+
```
217
+
218
+
```yaml
219
+
# Specify the root directory and directories in the root directory as the location of manifest files using the wildcard character
220
+
221
+
version: 2
222
+
updates:
223
+
- package-ecosystem: "composer"
224
+
directories:
225
+
- "*"
226
+
schedule:
227
+
interval: "weekly"
228
+
```
229
+
230
+
```yaml
231
+
# Specify all directories from the current layer and below recursively, using globstar, for locations of manifest files
232
+
233
+
version: 2
234
+
updates:
235
+
- package-ecosystem: "composer"
236
+
directories:
237
+
- "**/*"
238
+
schedule:
239
+
interval: "weekly"
240
+
```
241
+
242
+
{% endif %}
243
+
146
244
### `schedule.interval`
147
245
148
246
**Required**. You must define how often to check for new versions for each package manager. By default, {% data variables.product.prodname_dependabot %} randomly assigns a time to apply all the updates in the configuration file. To set a specific time, you can use [`schedule.time`](#scheduletime) and [`schedule.timezone`](#scheduletimezone).
Copy file name to clipboardExpand all lines: content/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates.md
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -64,9 +64,12 @@ You enable {% data variables.product.prodname_dependabot_version_updates %} by c
64
64
1. Optionally, if you have dependencies in a private registry, add a `registries` section containing authentication details. For more information, see [`registries`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#registries) in "Configuration options for the `dependabot.yml` file."
65
65
1. Add an `updates` section, with an entry for each package manager you want {% data variables.product.prodname_dependabot %} to monitor. This key is mandatory. You use it to configure how {% data variables.product.prodname_dependabot %} updates the versions or your project's dependencies. Each entry configures the update settings for a particular package manager.
66
66
1. For each package manager, use:
67
+
67
68
* `package-ecosystem` to specify the package manager. For more information about the supported package managers, see [`package-ecosystem`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem) in "Configuration options for the `dependabot.yml` file."
68
69
* `directory` to specify the location of the manifest or other definition files. For more information, see [`directory`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#directory) in "Configuration options for the `dependabot.yml` file."
70
+
{% ifversion dependabot-updates-multidirectory-support %}- `directories` to specify the location of multiple manifest or other definition files. For more information, see [`directories`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#directories) in "Configuration options for the `dependabot.yml` file."{% endif %}
69
71
* `schedule.interval` to specify how often to check for new versions. For more information, see [`schedule.interval`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#scheduleinterval) in "Configuration options for the `dependabot.yml` file."
72
+
70
73
{% data reusables.dependabot.check-in-dependabot-yml %}
Copy file name to clipboardExpand all lines: content/code-security/dependabot/working-with-dependabot/troubleshooting-dependabot-errors.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -214,7 +214,7 @@ The [`groups`](/code-security/dependabot/dependabot-version-updates/configuratio
214
214
215
215
For grouped security updates, {% data variables.product.prodname_dependabot %} uses the following guidelines to create grouped pull requests.
216
216
217
-
* {% data variables.product.prodname_dependabot %} **will** group dependencies from the same package ecosystem that are located in different directories. Grouping across directories only occurs for directories not configured in the `dependabot.yml` file.
217
+
* {% data variables.product.prodname_dependabot %} **will** group dependencies from the same package ecosystem that are located in different directories when grouping rules are specified for configurations that use the `directories` key.
218
218
* {% data variables.product.prodname_dependabot %} **will** apply other relevant customization options from the `dependabot.yml` file to pull requests for grouped security updates. {% data reusables.dependabot.dependabot-grouped-security-updates-yaml-override %}
219
219
* {% data variables.product.prodname_dependabot %} **will not** group dependencies from different package ecosystems together.
220
220
* {% data variables.product.prodname_dependabot %} **will not** group security updates with version updates.
You can enable grouped pull requests for {% data variables.product.prodname_dependabot_security_updates %} in one, or both, of the following ways.
2
+
2
3
* To group as many available security updates together as possible, across directories and per ecosystem, enable grouping in the "Code security and analysis" settings for your organization or repository.
3
-
* For more granular control of grouping, such as grouping by package name, development/production dependencies,or SemVer level, add configuration options to the `dependabot.yml` configuration file in your repository.
4
+
* For more granular control of grouping, such as grouping by package name, development/production dependencies,{% ifversion dependabot-updates-multidirectory-support %} SemVer level, or across multiple directories per ecosystem{% else %} or SemVer level{% endif %}, add configuration options to the `dependabot.yml` configuration file in your repository.
You can use `directories` instead of `directory` to apply the same configuration to a list of multiple directories. The `directory` or `directories` entries must be unique and cannot overlap with the `directory` or `directories` entries in blocks that have the same ecosystem and `target-branch`. You can have one block specifying multiple directories and another block with specifications for one directory only, but both keys can't be present in the same block.
Using `directory`, `directories`, or a mixture of both, are all valid approaches. You should tailor your configuration to your requirements. We recommend you use `directories` when you want to apply the exact same configuration to multiple directories or group dependency updates across multiple directories, and `directory` when you want to apply a configuration to only one directory, or if you want each directory to have a different configuration.
0 commit comments