diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index cad9718..993af2b 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -43,6 +43,9 @@ jobs: with: version: v2.11.4 # keep in step with the hook rev in .pre-commit-config.yaml - run: go mod tidy -diff + - uses: j178/prek-action@4e14d07f9231acabce116ccfca13b13dd9755ece # v3.0.0 + with: + extra-args: --all-files --hook-stage pre-push renovate-config-validator install-ps1: name: install.ps1 lint diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 17f6954..3a69558 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,6 +25,15 @@ repos: - id: golangci-lint-fmt - id: golangci-lint-config-verify + - repo: https://github.com/renovatebot/pre-commit-hooks + rev: 44.28.0 + hooks: + # The lint workflow runs this too. It cannot run on pre-commit.ci, whose + # 250MiB tier limit this hook's 400MiB node environment does not fit. + - id: renovate-config-validator + args: [--no-global] + stages: [pre-push] + - repo: local hooks: - id: go-mod-tidy @@ -42,4 +51,4 @@ repos: stages: [pre-push] ci: - skip: [golangci-lint-full, golangci-lint-config-verify, go-mod-tidy, go-test] + skip: [golangci-lint-full, golangci-lint-config-verify, go-mod-tidy, go-test, renovate-config-validator] diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..58d4215 --- /dev/null +++ b/renovate.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "security:only-security-updates", + ":semanticCommitTypeAll(deps)" + ], + "semanticCommitScope": "", + "postUpdateOptions": ["gomodUpdateImportPaths", "gomodTidy"], + "packageRules": [ + { + "description": "Eagerly bump flagsmith-go-client on every version release", + "matchPackageNames": ["github.com/Flagsmith/flagsmith-go-client{,/**}"], + "enabled": true, + "rangeStrategy": "bump" + }, + { + "matchManagers": ["gomod"], + "addLabels": ["dependencies"] + } + ] +}