Skip to content

Commit

Permalink
Merge pull request #16 from RightCapitalHQ/feature/add-a-new-preset-f…
Browse files Browse the repository at this point in the history
…or-library-projects

Feature/add a new preset for library projects
  • Loading branch information
liby authored Nov 10, 2023
2 parents 3336b8f + b24d729 commit 0c679db
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
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

0 comments on commit 0c679db

Please sign in to comment.