Skip to content

Commit a991b53

Browse files
jclement136isaacmbrownmchammer01
authored
Closing Down: Dependabot Reviewers (#56049)
Co-authored-by: Isaac Brown <101839405+isaacmbrown@users.noreply.github.com> Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
1 parent 586464b commit a991b53

File tree

4 files changed

+102
-1
lines changed

4 files changed

+102
-1
lines changed

content/code-security/dependabot/dependabot-security-updates/customizing-dependabot-security-prs.md

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,25 @@ For detailed guidance, see [Prioritizing meaningful updates](/code-security/depe
4444

4545
{% endif %}
4646

47+
{% ifversion dependabot-reviewers-deprecation %}
48+
49+
## Automatically adding reviewers
50+
51+
To ensure your project's security updates get addressed promptly by the appropriate team, you can automatically add reviewers to Dependabot pull requests using a CODEOWNERS file. See [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners).
52+
53+
{% else %}
54+
4755
## Automatically adding reviewers and assignees
4856

57+
> [!NOTE]
58+
> The `reviewers` property is closing down and will be removed in a future release of GitHub Enterprise Server.
59+
4960
To ensure your project's security updates get **addressed promptly** by the appropriate team, use `reviewers` and `assignees` to automatically add individuals or teams as **reviewers or assignees** to pull requests.
5061

5162
For detailed guidance, see [Automatically adding reviewers and assignees](/code-security/dependabot/dependabot-version-updates/customizing-dependabot-prs#automatically-adding-reviewers-and-assignees).
5263

64+
{% endif %}
65+
5366
## Labeling pull requests with custom labels
5467

5568
To **prioritize** specific pull requests, or integrate them into CI/CD pipelines, use `labels` to apply your own **custom labels** to each pull request.
@@ -79,9 +92,58 @@ For detailed guidance, see [Changing the separator in the pull request branch na
7992
In this example, the `dependabot.yml` file:
8093
* Uses a private registry for updates to npm dependencies.
8194
* Disables version updates for dependencies, so that any customizations apply to security updates only.
82-
* Is customized so that {% data variables.product.prodname_dependabot %} applies custom labels to the pull requests and automatically adds reviewers and assignees.{% ifversion dependabot-grouped-security-updates-config %}
95+
* Is customized so that {% data variables.product.prodname_dependabot %} applies custom labels to the pull requests and automatically adds {% ifversion ghes < 3.19 %}reviewers and {% endif %}assignees.{% ifversion dependabot-grouped-security-updates-config %}
8396
* Groups security updates for golang dependencies into a single pull request.{% endif %}
8497

98+
{% ifversion dependabot-reviewers-deprecation %}
99+
100+
```yaml copy
101+
# Example configuration file that:
102+
# - Uses a private registry for npm updates
103+
# - Ignores lodash dependency
104+
# - Disables version-updates
105+
# - Applies custom labels
106+
{% ifversion dependabot-grouped-security-updates-config %}# - Group security updates for golang dependencies into a single pull request{%- endif %}
107+
108+
version: 2
109+
registries:
110+
# Define a private npm registry with the name `example`
111+
example:
112+
type: npm-registry
113+
url: https://example.com
114+
token: {% raw %}${{secrets.NPM_TOKEN}}{% endraw %}
115+
updates:
116+
- package-ecosystem: "npm"
117+
directory: "/src/npm-project"
118+
schedule:
119+
interval: "daily"
120+
# For Lodash, ignore all updates
121+
ignore:
122+
- dependency-name: "lodash"
123+
# Disable version updates for npm dependencies
124+
open-pull-requests-limit: 0
125+
registries:
126+
# Ask Dependabot to use the private registry for npm
127+
- example
128+
# Raise all npm pull requests for security updates with custom labels
129+
labels:
130+
- "npm dependencies"
131+
- "triage-board"
132+
# Raise all npm pull requests for security updates with assignees
133+
assignees:
134+
- "user-name"
135+
{% ifversion dependabot-grouped-security-updates-config %}- package-ecosystem: "gomod"
136+
groups:
137+
# Group security updates for golang dependencies
138+
# into a single pull request
139+
golang:
140+
applies-to: security-updates
141+
patterns:
142+
- "golang.org*"{% endif %}
143+
```
144+
145+
{% else %}
146+
85147
```yaml copy
86148
# Example configuration file that:
87149
# - Uses a private registry for npm updates
@@ -132,6 +194,8 @@ updates:
132194
- "golang.org*"{% endif %}
133195
```
134196
197+
{% endif %}
198+
135199
## Example 2: configuration for version updates and security updates
136200
137201
In this example, the `dependabot.yml` file:

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,37 @@ shortTitle: Customize Dependabot PRs
1919

2020
There are various ways to customize your {% data variables.product.prodname_dependabot %} pull requests so that they better suit your own internal processes.
2121

22+
{% ifversion dependabot-reviewers-deprecation %}
23+
24+
For example, to integrate {% data variables.product.prodname_dependabot %}'s pull requests into your CI/CD pipelines, it can apply **custom labels** to pull requests, which you can then use to trigger action workflows.
25+
26+
{% else %}
27+
2228
For example:
2329
* To maximize efficiency, {% data variables.product.prodname_dependabot %} can automatically add specific individuals or teams as **reviewers** to its pull requests for a particular package ecosystem.
2430
* To integrate {% data variables.product.prodname_dependabot %}'s pull requests into your CI/CD pipelines, it can apply **custom labels** to pull requests, which you can then use to trigger action workflows.
2531

32+
{% endif %}
33+
2634
There are several different customization options which can all be used in combination, and tailored per package ecosystem.
2735

36+
{% ifversion dependabot-reviewers-deprecation %}
37+
38+
## Automatically adding reviewers
39+
40+
To ensure your project's security updates get addressed promptly by the appropriate team, you can automatically add reviewers to Dependabot pull requests using a CODEOWNERS file. See [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners).
41+
42+
{% else %}
43+
2844
## Automatically adding reviewers and assignees
2945

3046
By default, {% data variables.product.prodname_dependabot %} raises pull requests without any reviewers or assignees.
3147

3248
However, you may want pull requests to be consistently reviewed or dealt with by a specific individual or team that has expertise in that package ecosystem, or automatically assigned to a designated security team. In which case, you can use `reviewers` and `assignees` to set these values per package ecosystem.
3349

50+
> [!NOTE]
51+
> The `reviewers` property is closing down and will be removed in a future release of GitHub Enterprise Server.
52+
3453
The example `dependabot.yml` file below changes the npm configuration so that all pull requests opened with version and security updates for npm have:
3554
* A team ("`my-org/team-name`") and an individual ("`octocat`") automatically added as reviewers to the pull requests.
3655
* An individual ("`user-name`") automatically assigned to the pull requests.
@@ -59,6 +78,8 @@ updates:
5978
6079
See also [`assignees`](/code-security/dependabot/working-with-dependabot/dependabot-options-reference#assignees--) and [`reviewers`](/code-security/dependabot/working-with-dependabot/dependabot-options-reference#reviewers--).
6180

81+
{% endif %}
82+
6283
## Labeling pull requests with custom labels
6384

6485
{% data reusables.dependabot.default-labels %}

content/code-security/dependabot/working-with-dependabot/dependabot-options-reference.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,8 +456,13 @@ When `registries` is defined for a package manager:
456456

457457
Supported values: `REGISTRY_NAME` or `"*"`
458458

459+
{% ifversion dependabot-reviewers-deprecation %}{% else %}
460+
459461
## `reviewers` {% octicon "versions" aria-label="Version updates" height="24" %} {% octicon "shield-check" aria-label="Security updates" height="24" %}
460462

463+
> [!NOTE]
464+
> The `reviewers` property is closing down and will be removed in a future release of GitHub Enterprise Server.
465+
461466
Specify individual reviewers, or teams of reviewers, for all pull requests raised for a package manager. For examples, see [AUTOTITLE](/code-security/dependabot/dependabot-version-updates/customizing-dependabot-prs).
462467

463468
{% data variables.product.prodname_dependabot %} default behavior:
@@ -471,6 +476,11 @@ When `reviewers` is defined:
471476

472477
Reviewers must have at least read access to the repository.
473478

479+
> [!NOTE]
480+
> You can also automatically add reviewers and assignees using a CODEOWNERS file. See [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners).
481+
482+
{% endif %}
483+
474484
## `schedule` {% octicon "versions" aria-label="Version updates only" height="24" %}
475485

476486
**Required option.** Define how often to check for new versions for each package manager you configure using the `interval` parameter. Optionally, for daily and weekly intervals, you can customize when {% data variables.product.prodname_dependabot %} checks for updates. For examples, see [AUTOTITLE](/code-security/dependabot/dependabot-version-updates/optimizing-pr-creation-version-updates).
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Reference: #17818
2+
# Closing Down: Dependabot Reviewers Feature [Closing Down]
3+
versions:
4+
fpt: '*'
5+
ghec: '*'
6+
ghes: '>= 3.19'

0 commit comments

Comments
 (0)