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/reference/supply-chain-security/dependabot-options-reference.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -281,8 +281,11 @@ Parameters | Purpose |
281
281
| `IDENTIFIER` | Define an identifier for the group to use in branch names and pull request titles. This must start and end with a letter, and can contain letters, pipes `\|`, underscores `_`, or hyphens `-`. |
282
282
| `applies-to` | Specify which type of update the group applies to. When undefined, defaults to version updates. Supported values: `version-updates`or `security-updates`. |
283
283
| `dependency-type` | Limit the group to a type. Supported values: `development`or `production`. |
284
-
| `patterns` | Define one or more patterns to include dependencies with matching names. |
285
284
| `exclude-patterns` | Define one or more patterns to exclude dependencies from the group. |
285
+
| {% ifversion dependabot-updates-group-by %} |
286
+
| `group-by` | Group updates across multiple directories. Supported value: `dependency-name`. |
287
+
| {% endif %} |
288
+
| `patterns` | Define one or more patterns to include dependencies with matching names. |
286
289
| `update-types` | Limit the group to one or more semantic versioning levels. Supported values: `minor`, `patch`, and `major`. |
287
290
288
291
### `dependency-type` (`groups`)
@@ -294,6 +297,29 @@ By default, a group will include all types of dependencies.
294
297
* Use `development` to include only dependencies in the "Development dependency group."
295
298
* Use `production` to include only dependencies in the "Production dependency group."
296
299
300
+
{% ifversion dependabot-updates-group-by %}
301
+
302
+
### `group-by` (`groups`)
303
+
304
+
Use `groups.<group-name>.group-by` to specify how {% data variables.product.prodname_dependabot %} should group updates across multiple directories in a monorepo.
305
+
306
+
* **Type:** String
307
+
* **Accepted values:** `dependency-name`
308
+
* **Applies to:** Configurations with multiple directories specified
309
+
310
+
When set to `dependency-name`, {% data variables.product.prodname_dependabot %} will create a single pull request for each dependency update across all specified directories, rather than separate pull requests per directory.
311
+
312
+
**Limitations of cross-directory grouping**
313
+
314
+
When using `group-by: dependency-name`:
315
+
* All directories must use the same package ecosystem (for example, all `npm` or all `bundler`)
316
+
* Applies to **version updates only**
317
+
* If directories have incompatible version constraints for a dependency, {% data variables.product.prodname_dependabot %} will create separate pull requests
318
+
319
+
For examples showing the use of `group-by`, see [AUTOTITLE](/code-security/tutorials/secure-your-dependencies/optimizing-pr-creation-version-updates#grouping-updates-across-directories-in-a-monorepo).
320
+
321
+
{% endif %}
322
+
297
323
### `patterns` and `exclude-patterns` (`groups`)
298
324
299
325
Both options support using `*` as a wild card to define matches with dependency names. If a dependency matches both a pattern and an exclude-pattern, then it is excluded from the group.
Copy file name to clipboardExpand all lines: content/code-security/tutorials/secure-your-dependencies/optimizing-pr-creation-version-updates.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,6 +110,8 @@ See also [`cooldown`](/code-security/dependabot/working-with-dependabot/dependab
110
110
111
111
## Prioritizing meaningful updates
112
112
113
+
### Grouping related dependencies together
114
+
113
115
You can use `groups` to consolidate updates for multiple dependencies into a single pull request. This helps you focus your review time on higher risk updates, and minimize the time spent reviewing minor version updates. For example, you can combine updates for minor or patch updates for development dependencies into a single pull request, and have a dedicated group for security or version updates that impact a key area of your codebase.
114
116
115
117
You must configure groups per individual package ecosystem, then you can create multiple groups per package ecosystem using a combination of criteria:
@@ -124,3 +126,36 @@ To see all supported values for each criterion, see [`groups`](/code-security/de
124
126
The below examples present several different methods to create groups of dependencies using the criteria.
125
127
126
128
{% data reusables.dependabot.dependabot-version-updates-groups-yaml-example %}
129
+
130
+
{% ifversion dependabot-updates-group-by %}
131
+
132
+
### Grouping updates across directories in a monorepo
133
+
134
+
If you manage a monorepo with multiple directories that share common dependencies, you can reduce the number of pull requests for version updates by grouping updates by dependency name across all directories.
135
+
136
+
When you configure {% data variables.product.prodname_dependabot %} to monitor multiple directories and enable grouping by dependency name, {% data variables.product.prodname_dependabot %} will:
137
+
* Create a single pull request for each dependency update that affects multiple directories
138
+
* Update the same dependency to the same version across all directories in one operation
139
+
* Reduce the number of pull requests you need to review
140
+
* Minimize CI/CD costs by running tests once instead of per directory
141
+
142
+
For more information, see [`group-by`](/code-security/reference/supply-chain-security/dependabot-options-reference#group-by-groups).
143
+
144
+
This configuration example groups updates by dependency name across the `/frontend`, `/admin-panel`, and `/mobile-app` directories. If `lodash` needs to be updated in all three directories, {% data variables.product.prodname_dependabot %} will create a single pull request named "Bump lodash in monorepo-dependencies group" that updates `lodash` in all three locations.
0 commit comments