Skip to content

Commit

Permalink
Merge pull request #1 from p3ol/feature/add-base-presets
Browse files Browse the repository at this point in the history
✨ feat: add base presets - INFRA-424
  • Loading branch information
yannispgs authored Nov 16, 2023
2 parents 06cb5a8 + c4197c9 commit 2c6448b
Show file tree
Hide file tree
Showing 11 changed files with 8,402 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{ REMOVE THIS TO WRITE YOUR OWN DESCRIPTION }

## PR title rules

- Should have an emoji so it's clear what it does from the list view
- Should have a type (feat, fix, chore, ...)
- Can have a subject (but it's not mandatory)

## Available emojis

- ✨ → New feature
- 🐛 → Bug fix
- ♻️ → Drastically rewrites a big percentage of the code or architecture
- 🏗 → Add/update unit tests
- 📦 → Dependency maintenance and/or internal script update
- 📖 → Documentation update

## Allowed types
- chore
- docs
- feat
- fix
- refactor
- test
- tests
- deploy
- release

## Don't do

```
Feature: Add new time picker
fix the thing that was not working
```

## Do

```
✨ feat(dashboard): add new time picker to stats view
🐛 fix(access): don't register emails twice on mailchimp
```
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CI

on:
push:
branches: [master]
tags: ['**']
pull_request:
branches: [master]

jobs:
test:
name: Validate Presets
runs-on: ubuntu-22.04
timeout-minutes: 2
steps:
- name: Checkout code
uses: actions/checkout@v4
# This will cache npx packages until this file changes
- name: Setup npx cache
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn

- name: Install dependencies
run: yarn install --immutable
- name: Validate Presets config
run: yarn test --strict
62 changes: 62 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Logs
logs
db-logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

build
package-lock.json
.env
.test.env

app.tmp.yml
app.yml
app.yaml
db.tmp.tar.gz
tmp/
.DS_Store
.idea
globalConfig.json
.google.json

# Yarn 3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
875 changes: 875 additions & 0 deletions .yarn/releases/yarn-3.7.0.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
enableGlobalCache: true

nodeLinker: pnpm

yarnPath: .yarn/releases/yarn-3.7.0.cjs
17 changes: 17 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "renovate-presets",
"version": "0.0.0",
"repository": "https://github.com/p3ol/renovate-presets.git",
"author": "Yannis Pagès <[email protected]>",
"private": true,
"engines": {
"node": "^20"
},
"devDependencies": {
"renovate": "37.60.3"
},
"scripts": {
"test": "renovate-config-validator presets/*.json renovate.json"
},
"packageManager": "[email protected]"
}
53 changes: 53 additions & 0 deletions presets/base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"extends": [
"config:recommended"
],
"prHourlyLimit": 0,
"prConcurrentLimit": 10,
"customManagers": [{
"customType": "regex",
"fileMatch": ["^Dockerfile"],
"matchStrings": ["FROM node:(?<currentValue>.*?)-bullseye-slim.*\\n"],
"depNameTemplate": "node",
"datasourceTemplate": "node",
"versioningTemplate": "node"
}],
"packageRules": [{
"matchUpdateTypes": ["patch", "pin"],
"matchDepTypes": ["devDependencies"],
"automerge": true
}, {
"matchUpdateTypes": ["patch", "pin"],
"matchManagers": ["github-actions"],
"automerge": true
}, {
"matchDepTypes": ["devDependencies"],
"matchManagers": ["npm"],
"prPriority": -1
}, {
"matchUpdateTypes": ["minor","major"],
"matchDepTypes": ["dependencies"],
"matchManagers": ["npm"],
"semanticCommitType": "feat"
}, {
"matchUpdateTypes": ["patch"],
"matchDepTypes": ["dependencies"],
"matchManagers": ["npm"],
"semanticCommitType": "fix"
}, {
"matchPackagePatterns": ["^@poool/eslint"],
"matchManagers": ["npm"],
"groupName": "poool eslint monorepo"
}, {
"matchPackagePatterns": ["^@junipero"],
"matchManagers": ["npm"],
"groupName": "poool junipero monorepo"
}, {
"matchPackagePatterns": ["^@oakjs"],
"matchManagers": ["npm"],
"groupName": "poool oak monorepo"
}, {
"matchManagers": ["dockerfile", "kubernetes", "github-actions"],
"assignees": ["yannispgs"]
}]
}
15 changes: 15 additions & 0 deletions presets/main-develop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"baseBranches": [
"main",
"develop"
],
"packageRules" : [{
"matchUpdateTypes": ["major","minor"],
"matchBaseBranches": ["main"],
"enabled": false
}, {
"matchUpdateTypes": ["patch"],
"matchBaseBranches": ["develop"],
"enabled": false
}]
}
15 changes: 15 additions & 0 deletions presets/master-develop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"baseBranches": [
"master",
"develop"
],
"packageRules" : [{
"matchUpdateTypes": ["major","minor"],
"matchBaseBranches": ["master"],
"enabled": false
}, {
"matchUpdateTypes": ["patch"],
"matchBaseBranches": ["develop"],
"enabled": false
}]
}
5 changes: 5 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"local>p3ol/renovate-presets:base"
]
}
Loading

0 comments on commit 2c6448b

Please sign in to comment.