Skip to content

Commit 07f9e36

Browse files
authored
Merge pull request #26354 from github/repo-sync
Repo sync
2 parents c804f73 + a65c151 commit 07f9e36

12 files changed

+143
-6
lines changed

content/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ If you enable _security updates_, {% data variables.product.prodname_dependabot
4747

4848
You specify how often to check each ecosystem for new versions in the configuration file: daily, weekly, or monthly.
4949

50-
{% data reusables.dependabot.initial-updates %}
50+
{% data reusables.dependabot.initial-updates %} For more information, see "[AUTOTITLE](/code-security/dependabot/dependabot-version-updates/customizing-dependency-updates)."
5151

5252
If you've enabled security updates, you'll sometimes see extra pull requests for security updates. These are triggered by a {% data variables.product.prodname_dependabot %} alert for a dependency on your default branch. {% data variables.product.prodname_dependabot %} automatically raises a pull request to update the vulnerable dependency.
5353

content/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ These options fit broadly into the following categories.
5050

5151
- Essential set up options that you must include in all configurations: [`package-ecosystem`](#package-ecosystem), [`directory`](#directory),[`schedule.interval`](#scheduleinterval).
5252
- Options to customize the update schedule: [`schedule.time`](#scheduletime), [`schedule.timezone`](#scheduletimezone), [`schedule.day`](#scheduleday).
53-
- Options to control which dependencies are updated: [`allow`](#allow), [`ignore`](#ignore), [`vendor`](#vendor).
53+
- Options to control which dependencies are updated: [`allow`](#allow), {% ifversion dependabot-version-updates-groups %}[`groups`](#groups),{% endif %} [`ignore`](#ignore), [`vendor`](#vendor).
5454
- Options to add metadata to pull requests: [`reviewers`](#reviewers), [`assignees`](#assignees), [`labels`](#labels), [`milestone`](#milestone).
5555
- Options to change the behavior of the pull requests: [`target-branch`](#target-branch), [`versioning-strategy`](#versioning-strategy), [`commit-message`](#commit-message), [`rebase-strategy`](#rebase-strategy), [`pull-request-branch-name.separator`](#pull-request-branch-nameseparator).
5656

@@ -326,6 +326,34 @@ If you use the same configuration as in the example above, bumping the `requests
326326

327327
`pip dev: bump requests from 1.0.0 to 1.0.1`
328328

329+
{% ifversion dependabot-version-updates-groups %}
330+
### `groups`
331+
332+
{% data reusables.dependabot.dependabot-version-updates-groups-beta %}
333+
334+
{% data reusables.dependabot.dependabot-version-updates-groups-about %}
335+
336+
{% data reusables.dependabot.dependabot-version-updates-groups-supported %}
337+
338+
When you first configure a group, you specify a group name that will display in pull request titles and branch names. In the example below, the name of the group is `dev-dependencies`.
339+
340+
You then define `patterns` (strings of characters) that match with a dependency name (or multiple dependency names) to include those dependencies in the group.
341+
342+
If a dependency doesn't belong to any group, {% data variables.product.prodname_dependabot %} will continue to raise single pull requests to update the dependency to its latest version as normal.
343+
344+
You can also use `exclude-patterns` to exclude certain dependencies from the group. If a dependency is excluded from a group, {% data variables.product.prodname_dependabot %} will continue to raise single pull requests to update the dependency to its latest version.
345+
346+
Note that you can't use `@dependabot ignore` with pull requests for grouped updates. If you want to ignore version updates for a dependency, you must configure an [`ignore`](#ignore) rule for the dependency in the `dependabot.yml` file.
347+
348+
When a scheduled update runs, {% data variables.product.prodname_dependabot %} will refresh pull requests for grouped updates using the following rules:
349+
- if all the same dependencies need to be updated to the same versions, {% data variables.product.prodname_dependabot %} will rebase the branch.
350+
- if all the same dependencies need to be updated, but a newer version has become available for one (or more) of the dependencies, {% data variables.product.prodname_dependabot %} will close the pull request and create a new one.
351+
- if the dependencies to be updated have changed - for example, if another dependency in the group now has an update available - {% data variables.product.prodname_dependabot %} will close the pull request and create a new one.
352+
353+
{% data reusables.dependabot.dependabot-version-updates-groups-yaml-example %}
354+
355+
{% endif %}
356+
329357
### `ignore`
330358

331359
{% data reusables.dependabot.default-dependencies-allow-ignore %}

content/code-security/dependabot/dependabot-version-updates/customizing-dependency-updates.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ shortTitle: Customize updates
3030
After you've enabled version updates, you can customize how {% data variables.product.prodname_dependabot %} maintains your dependencies by adding further options to the _dependabot.yml_ file. For example, you could:
3131

3232
- Specify which day of the week to open pull requests for version updates: `schedule.day`
33-
- Set reviewers, assignees, and labels for each package manager: `reviewers`, `assignees`, and `labels`
33+
- Set reviewers, assignees, and labels for each package manager: `reviewers`, `assignees`, and `labels`{%- ifversion dependabot-version-updates-groups %}
34+
- Create groups of dependencies (per package ecosystem), so that {% data variables.product.prodname_dependabot %} updates the group of dependencies in a single pull request: `groups`{% endif %}
3435
- Define a versioning strategy for changes to each manifest file: `versioning-strategy`
3536
- Change the maximum number of open pull requests for version updates from the default of 5: `open-pull-requests-limit`
3637
- Open pull requests for version updates to target a specific branch, instead of the default branch: `target-branch`
@@ -138,6 +139,22 @@ updates:
138139
- "Docker dependencies"
139140
- "triage-board"
140141
```
142+
{% ifversion dependabot-version-updates-groups %}
143+
## Grouping {% data variables.product.prodname_dependabot_version_updates %} into one pull request
144+
145+
{% data reusables.dependabot.dependabot-version-updates-groups-beta %}
146+
147+
{% data reusables.dependabot.dependabot-version-updates-groups-about %}
148+
149+
{% data reusables.dependabot.dependabot-version-updates-groups-supported %}
150+
151+
The example `dependabot.yml` file changes the bundler configuration to create a group of dependencies. The configuration specifies `patterns` (strings of characters) that match with the name of a dependency (or multiple dependencies) in order to include the dependencies in the group. You can also use `exclude-patterns` to exclude a dependency (or multiple dependencies) from the group. For more information, see "[AUTOTITLE](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups)."
152+
153+
You must configure groups per package ecosystem.
154+
155+
{% data reusables.dependabot.dependabot-version-updates-groups-yaml-example %}
156+
157+
{% endif %}
141158

142159
## More examples
143160

content/code-security/dependabot/working-with-dependabot/managing-pull-requests-for-dependency-updates.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ shortTitle: Manage Dependabot PRs
3030
When {% data variables.product.prodname_dependabot %} raises a pull request, you're notified by your chosen method for the repository. Each pull request contains detailed information about the proposed change, taken from the package manager. These pull requests follow the normal checks and tests defined in your repository.
3131
{% ifversion fpt or ghec %}In addition, where enough information is available, you'll see a compatibility score. This may also help you decide whether or not to merge the change. For information about this score, see "[AUTOTITLE](/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates)."{% endif %}
3232

33-
If you have many dependencies to manage, you may want to customize the configuration for each package manager so that pull requests have specific reviewers, assignees, and labels. For more information, see "[AUTOTITLE](/code-security/dependabot/dependabot-version-updates/customizing-dependency-updates)."
33+
If you have many dependencies to manage, you may want to customize the configuration for each package manager so that pull requests have specific reviewers, assignees, and labels. {% ifversion dependabot-version-updates-groups %} You may also want to group sets of dependencies together, so that multiple dependencies are updated in a single pull request.{% endif %} For more information, see "[AUTOTITLE](/code-security/dependabot/dependabot-version-updates/customizing-dependency-updates)."
3434

3535
{% ifversion dependabot-updates-paused %}
3636

@@ -77,4 +77,8 @@ You can use any of the following commands on a {% data variables.product.prodnam
7777

7878
{% data variables.product.prodname_dependabot %} will react with a "thumbs up" emoji to acknowledge the command, and may respond with a comment on the pull request. While {% data variables.product.prodname_dependabot %} usually responds quickly, some commands may take several minutes to complete if {% data variables.product.prodname_dependabot %} is busy processing other updates or commands.
7979

80-
If you run any of the commands for ignoring dependencies or versions, {% data variables.product.prodname_dependabot %} stores the preferences for the repository centrally. While this is a quick solution, for repositories with more than one contributor it is better to explicitly define the dependencies and versions to ignore in the configuration file. This makes it easy for all contributors to see why a particular dependency isn't being updated automatically. For more information, see "[AUTOTITLE](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#ignore)."
80+
If you run any of the commands for ignoring dependencies or versions, {% data variables.product.prodname_dependabot %} stores the preferences for the repository centrally. While this is a quick solution, for repositories with more than one contributor it is better to explicitly define the dependencies and versions to ignore in the configuration file. This makes it easy for all contributors to see why a particular dependency isn't being updated automatically.
81+
82+
{% ifversion dependabot-version-updates-groups %}If you use the `groups` configuration option, you cannot use the `@dependabot ignore` comment on the pull request. You must instead define the dependencies to ignore in the configuration file.{% endif %}
83+
84+
For more information, see "[AUTOTITLE](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#ignore)."

content/code-security/dependabot/working-with-dependabot/troubleshooting-dependabot-errors.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,46 @@ To allow {% data variables.product.prodname_dependabot %} to update the dependen
145145

146146
**Version updates only.** {% data reusables.dependabot.private-dependencies-note %} Additionally, {% data variables.product.prodname_dependabot %} doesn't support private {% data variables.product.prodname_dotcom %} dependencies for all package managers. For more information, see "[AUTOTITLE](/code-security/dependabot/dependabot-version-updates/about-dependabot-version-updates#supported-repositories-and-ecosystems)."
147147

148+
{% ifversion dependabot-version-updates-groups %}
149+
150+
### {% data variables.product.prodname_dependabot %} fails to group a set of dependencies into a single pull request
151+
152+
{% data reusables.dependabot.dependabot-version-updates-groups-beta %}
153+
154+
You must configure groups per package ecosystem.
155+
156+
{% data reusables.dependabot.dependabot-version-updates-groups-supported %}
157+
158+
For more information on how to configure groups for {% data variables.product.prodname_dependabot_version_updates %}, see "[AUTOTITLE](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups)."
159+
160+
### {% data variables.product.prodname_dependabot %} fails to update one of the dependencies in a grouped pull request
161+
162+
{% data reusables.dependabot.dependabot-version-updates-groups-beta %}
163+
164+
**Version updates only.** {% data variables.product.prodname_dependabot %} will show the failed update in your logs, as well as in the job summary at the end of your logs. You should use the `@dependabot recreate` comment on the pull request to build the group again. For more information, see "[AUTOTITLE](/code-security/dependabot/working-with-dependabot/managing-pull-requests-for-dependency-updates#managing-dependabot-pull-requests-with-comment-commands)."
165+
166+
If the dependency still fails to update, you should use the `exclude-patterns` configuration so that the dependency is excluded from the group. {% data variables.product.prodname_dependabot %} will then raise a separate pull request to update the dependency.
167+
168+
If the dependency still fails to update, there may be a problem with the dependency itself, or with {% data variables.product.prodname_dependabot %} for that specific ecosystem.
169+
170+
If you want to ignore version updates for the dependency, you must configure an `ignore` rule for the dependency in the `dependabot.yml` file.
171+
172+
For more information, see "[AUTOTITLE](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file)."
173+
174+
### Continuous integration (CI) fails on my grouped pull request
175+
176+
{% data reusables.dependabot.dependabot-version-updates-groups-beta %}
177+
178+
**Version updates only.** If the failure is due to a single dependency, you should use the `exclude-patterns` configuration so that the dependency is excluded from the group. {% data variables.product.prodname_dependabot %} will then raise a separate pull request to update the dependency.
179+
180+
If you want to ignore version updates for the dependency, you must configure an `ignore` rule for the dependency in the `dependabot.yml` file.
181+
182+
For more information, see "[AUTOTITLE](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file)."
183+
184+
If you continue to see CI failures, you should remove the group configuration so that {% data variables.product.prodname_dependabot %} reverts to raising individual pull requests for each dependency. Then, you should check and confirm that the update works correctly for each individual pull request.
185+
186+
{% endif %}
187+
148188
## Triggering a {% data variables.product.prodname_dependabot %} pull request manually
149189

150190
If you unblock {% data variables.product.prodname_dependabot %}, you can manually trigger a fresh attempt to create a pull request.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Reference: Issue #10346
2+
# Dependabot Grouped Updates - [Public Beta]
3+
4+
versions:
5+
fpt: '*'
6+
ghec: '*'

data/reusables/dependabot/configuration-options.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
| [`allow`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#allow) | {% octicon "x" aria-label="Not supported" %}| {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | Customize which updates are allowed |
77
| [`assignees`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#assignees) | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | Assignees to set on pull requests |
88
| [`commit-message`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#commit-message) | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | Commit message preferences |{% ifversion fpt or ghec or ghes %}
9-
| [`enable-beta-ecosystems`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#enable-beta-ecosystems) | {% octicon "x" aria-label="Not supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | Enable ecosystems that have beta-level support |{% endif %}
9+
| [`enable-beta-ecosystems`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#enable-beta-ecosystems) | {% octicon "x" aria-label="Not supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | Enable ecosystems that have beta-level support |{% endif %}{% ifversion dependabot-version-updates-groups %}
10+
| [`groups`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups) | {% octicon "x" aria-label="Not supported" %} | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | Group updates for certain dependencies |{% endif %}
1011
| [`ignore`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#ignore) | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | Ignore certain dependencies or versions |
1112
| [`insecure-external-code-execution`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#insecure-external-code-execution) | {% octicon "x" aria-label="Not supported" %}| {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | Allow or deny code execution in manifest files |
1213
| [`labels`](/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#labels) | {% octicon "x" aria-label="Not supported" %} | {% octicon "check" aria-label="Supported" %} | {% octicon "check" aria-label="Supported" %} | Labels to set on pull requests |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
By default, {% data variables.product.prodname_dependabot %} raises a single pull request for each dependency that needs to be updated to a newer version. You can use `groups` to create sets of dependencies (per package manager), so that {% data variables.product.prodname_dependabot %} opens a single pull request to update multiple dependencies at the same time.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{% ifversion dependabot-version-updates-groups %}
2+
3+
{% note %}
4+
5+
**Note:** {% data variables.product.prodname_dependabot %} grouped updates are currently in beta and is subject to change.
6+
7+
{% endnote %}
8+
9+
{% endif %}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
You can only create groups for {% data variables.product.prodname_dependabot_version_updates %}. {% data variables.product.prodname_dependabot_security_updates %} do not support grouped updates.

0 commit comments

Comments
 (0)