Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add a new preset for library projects #16

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@
[ci-badge]: https://github.com/RightCapitalHQ/renovate-config/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/RightCapitalHQ/renovate-config/actions/workflows/ci.yml

A [shareable config preset](https://docs.renovatebot.com/config-presets/) for Renovate used in [RightCapital](https://www.rightcapital.com/).
[Shareable config presets](https://docs.renovatebot.com/config-presets/) for Renovate used in [RightCapital](https://www.rightcapital.com/).

## Usage

Enable Renovate in your repository and just `extends` in _renovate.json_.

```json
{
"extends": ["github>RightCapitalHQ/renovate-config"]
"extends": ["github>RightCapitalHQ/renovate-config"],

// for library projects, use library preset instead
"extends": ["github>RightCapitalHQ/renovate-config:library"]
}
```

Expand Down
7 changes: 3 additions & 4 deletions default.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"automergeType": "pr",
"description": "Default config for RightCapital repositories",
"description": "App-specific config for RightCapital repositories",
"extends": ["config:recommended", ":pinAllExceptPeerDependencies"],
"labels": ["renovate"],
"npm": {
"commitMessageTopic": "{{prettyDepType}} {{depName}}"
},
"packageRules": [
{
"description": "Automerge non-major updates",
"groupName": "Non-major Updates",
"groupSlug": "auto-merge-non-major-updates",
"description": "Automerge non-major updates and lockfile maintenance",
"groupName": "Non-major Updates and Lockfile Maintenance(auto merge)",
"matchUpdateTypes": ["minor", "patch", "lockFileMaintenance"],
"automerge": true
}
Expand Down
19 changes: 19 additions & 0 deletions library.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"automergeType": "pr",
"description": "Library-specific config for RightCapital repositories",
"extends": ["config:recommended", ":pinAllExceptPeerDependencies"],
"labels": ["renovate"],
"npm": { "commitMessageTopic": "{{prettyDepType}} {{depName}}" },
"packageRules": [
{
"description": "Automerge non-major updates",
"groupName": "Non-major Updates(auto merge)",
"matchUpdateTypes": ["minor", "patch"],
"automerge": true
}
],
"platformAutomerge": true,
"postUpdateOptions": ["npmDedupe", "pnpmDedupe", "yarnDedupeFewer"],
"prCreation": "immediate",
"rangeStrategy": "auto"
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
"scripts": {
"lint": "prettier -c .",
"fix": "prettier -w .",
"validate": "renovate-config-validator --strict default.json",
"test": "pnpm run validate",
"validate:default": "renovate-config-validator --strict default.json",
"validate:library": "renovate-config-validator --strict library.json",
"test": "pnpm run /^validate:/",
"prepare": "pnpm run test"
},
"devDependencies": {
Expand Down