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/how-tos/secure-your-supply-chain/manage-your-dependency-security/controlling-dependencies-updated.md
+55-2Lines changed: 55 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,7 +133,7 @@ For more information, see `allow` in [AUTOTITLE](/code-security/dependabot/worki
133
133
By default, {% data variables.product.prodname_dependabot %} creates version update pull requests only for the dependencies that are explicitly defined in a manifest (`direct` dependencies). This configuration uses `allow` to tell {% data variables.product.prodname_dependabot %} that we want it to maintain `all` types of dependency. That is, both the `direct` dependencies and their dependencies (also known as indirect dependencies, sub-dependencies, or transient dependencies). In addition, the configuration tells {% data variables.product.prodname_dependabot %} to ignore all dependencies with a name matching the pattern `org.xwiki.*` because we have a different process for maintaining them.
134
134
135
135
> [!TIP]
136
-
> {% data variables.product.prodname_dependabot %} checks for all **allowed** dependencies, then filters out any **ignored** dependencies. If a dependency is matched by an **allow** and an **ignore** statement, then it is ignored.
136
+
> {% data variables.product.prodname_dependabot %} checks for all **allowed** dependencies, then filters out any **ignored** dependencies. If a dependency is matched by an **allow** and an **ignore** statement, then it is ignored.{% ifversion dependabot-allow-update-types %} You can also use `update-types` in `allow` rules to restrict updates to specific semantic versioning levels.{% endif %}
137
137
138
138
```yaml copy
139
139
version: 2
@@ -167,6 +167,58 @@ updates:
167
167
open-pull-requests-limit: 15
168
168
```
169
169
170
+
{% ifversion dependabot-allow-update-types %}
171
+
172
+
## Allowing specific semantic versioning levels for updates
173
+
174
+
You can use `update-types` with `allow` to restrict updates to specific semantic versioning (SemVer) levels. This is useful when you want to be explicit about which types of updates Dependabot should create pull requests for.
175
+
176
+
> [!NOTE]
177
+
> `update-types` only affects _version_ updates, not _security_ updates. Security updates will always be created regardless of the `update-types` setting.
178
+
179
+
For more information, see `update-types` in [AUTOTITLE](/code-security/dependabot/working-with-dependabot/dependabot-options-reference#update-types-allow).
180
+
181
+
Here are some examples showing how `update-types` can be used with `allow`.
182
+
183
+
* To allow only minor and patch updates for a specific dependency, you can combine `update-types` with `dependency-name`.
* To apply different update policies for production and development dependencies, you can combine `update-types` with `dependency-type`.
200
+
201
+
```yaml copy
202
+
version: 2
203
+
updates:
204
+
- package-ecosystem: "composer"
205
+
directory: "/"
206
+
schedule:
207
+
interval: "monthly"
208
+
allow:
209
+
- dependency-type: "production"
210
+
update-types:
211
+
- "version-update:semver-patch"
212
+
- dependency-type: "development"
213
+
update-types:
214
+
- "version-update:semver-minor"
215
+
- "version-update:semver-patch
216
+
```
217
+
218
+
In this example, production dependencies will only receive patch updates, while development dependencies will receive both minor and patch updates.
219
+
220
+
{% endif %}
221
+
170
222
## Ignoring specific versions or ranges of versions
171
223
172
224
You can use `versions` in conjunction with `ignore` to ignore specific versions or ranges of versions.
@@ -201,7 +253,8 @@ For more information, see `versions` in [AUTOTITLE](/code-security/dependabot/wo
201
253
202
254
## Specifying the semantic versioning level to ignore
203
255
204
-
You can specify one or more semantic versioning (SemVer) levels to ignore using `update-types`.
256
+
257
+
You can specify one or more semantic versioning (SemVer) levels to ignore using `update-types` with `ignore`.{% ifversion dependabot-allow-update-types %} Alternatively, you can use `update-types` with `allow` to explicitly specify which update levels to allow, see [Allowing specific semantic versioning levels for updates](#allowing-specific-semantic-versioning-levels-for-updates).{% endif %}
205
258
206
259
For more information, see `update-types` in [AUTOTITLE](/code-security/dependabot/working-with-dependabot/dependabot-options-reference#update-types-ignore).
Copy file name to clipboardExpand all lines: content/code-security/reference/supply-chain-security/dependabot-options-reference.md
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,9 @@ When `allow` is specified {% data variables.product.prodname_dependabot %} uses
81
81
|------------|---------|
82
82
| `dependency-name` | Allow updates for dependencies with matching names, optionally using `*` to match zero or more characters. |
83
83
| `dependency-type` | Allow updates for dependencies of specific types. |
84
+
| {% ifversion dependabot-allow-update-types %} |
85
+
| `update-types` | Allow updates to one or more semantic versioning levels. Supported values: `version-update:semver-patch`, `version-update:semver-minor`, and `version-update:semver-major`. |
86
+
| {% endif %} |
84
87
85
88
### `dependency-name` (`allow`)
86
89
@@ -101,6 +104,26 @@ For most package managers, you should define a value that will match the depende
101
104
| `production` | `bundler`, `composer`, `mix`, `maven`, `npm`, `pip`{% ifversion dependabot-uv-support %}, `uv`{% endif %} (not all managers) | Only to dependencies defined by the package manager as production dependencies. |
102
105
| `development`| `bundler`, `composer`, `mix`, `maven`, `npm`, `pip`{% ifversion dependabot-uv-support %}, `uv`{% endif %} (not all managers) | Only to dependencies defined by the package manager as development dependencies. |
103
106
107
+
{% ifversion dependabot-allow-update-types %}
108
+
109
+
### `update-types` (`allow`)
110
+
111
+
`update-types`only affects _version_ updates, not _security updates_.
112
+
113
+
Specify which semantic versions (SemVer) to allow.
114
+
115
+
SemVer is an accepted standard for defining versions of software packages, in the form `x.y.z`. {% data variables.product.prodname_dependabot %} assumes that versions in this form are always `major.minor.patch`. The `update-types` value is a list of one or more strings.
116
+
117
+
* Use `version-update:semver-patch` to allow patch releases.
118
+
* Use `version-update:semver-minor` to allow minor releases.
119
+
* Use `version-update:semver-major` to allow major releases.
120
+
121
+
When `update-types` is omitted from an `allow` rule, all update types are allowed for that rule.
122
+
123
+
You can combine `update-types` with `dependency-name` or `dependency-type` to further narrow allowed updates. For examples of how you can combine these options, see [AUTOTITLE](/code-security/how-tos/secure-your-supply-chain/manage-your-dependency-security/controlling-dependencies-updated#allowing-specific-semantic-versioning-levels-for-updates).
Specify individual assignees for all pull requests raised for a package ecosystem. For examples, see [AUTOTITLE](/code-security/dependabot/dependabot-version-updates/customizing-dependabot-prs).
@@ -351,7 +374,7 @@ When `ignore` is used {% data variables.product.prodname_dependabot %} uses the
351
374
|------------|---------|
352
375
| `dependency-name` | Ignore updates for dependencies with matching names, optionally using `*` to match zero or more characters. |
353
376
| `versions` | Ignore specific versions or ranges of versions. |
354
-
| `update-types` | Ignore updates to one or more semantic versioning levels. Supported values: `version-update:semver-minor`, `version-update:semver-patch`, and `version-update:semver-major`. |
377
+
| `update-types` | Ignore updates to one or more semantic versioning levels. Supported values: `version-update:semver-patch`, `version-update:semver-minor`, and `version-update:semver-major`. |
0 commit comments