Skip to content

Commit cbdac19

Browse files
committed
Add dependabot configuration file
This automatically enables Dependabot to: * Submit pull requests for security updates and version updates for Composer dependencies. * Submit pull requests for security updates and version updates for GH Action runner dependencies. For Composer dependencies, a preference is given to _widen_ the version restrictions instead of updating them to a new minimum. This is a deliberate choice as this package is a library, not an application. The configuration has been set up to: * Run once a week. * Submit a maximum of 5 pull requests at a time. If additional pull requests are needed, these will subsequently be submitted the next time Dependabot runs after one or more of the open pull requests have been merged. * The commit messages for PRs submitted by Dependabot will be prefixed according the unofficial conventions used in this repo up to now. * The PRs will automatically be labelled with an appropriate label as already in use in this repo. Additionally, for Composer updates, I've applied the following restrictions: * Only allow updates for "dev" dependencies, as non-dev dependencies (PHPCS, Composer Installers) will need a code review and likely warrant code changes. * Ignore major releases of the PHPUnit Polyfills package (= new PHPUnit major) as those generally require a managed update of the test suite. Refs: * https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file * https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#versioning-strategy
1 parent 1a457ec commit cbdac19

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/dependabot.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Dependabot configuration.
2+
#
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "composer"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"
12+
open-pull-requests-limit: 5 # Set to 0 to (temporarily) disable.
13+
versioning-strategy: widen
14+
allow:
15+
# Only allow updates to the dev dependencies as non-dev dependency
16+
# updates will generally need code changes in this package.
17+
- dependency-type: "development"
18+
ignore:
19+
# A new PHPUnit major will generally require a managed update,
20+
# so do not allow automated PRs.
21+
- dependency-name: "yoast/phpunit-polyfills"
22+
update-types: ["version-update:semver-major"]
23+
commit-message:
24+
prefix: "Composer:"
25+
include: "scope"
26+
labels:
27+
- "builds / deploys / releases"
28+
29+
- package-ecosystem: "github-actions"
30+
directory: "/"
31+
schedule:
32+
interval: "weekly"
33+
open-pull-requests-limit: 5
34+
commit-message:
35+
prefix: "GH Actions:"
36+
labels:
37+
- "builds / deploys / releases"

0 commit comments

Comments
 (0)