diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..ac6097c --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,14 @@ +name: pre-commit + +on: + pull_request: + push: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 + - uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507 # v3.0.0 diff --git a/.github/workflows/renovate-config-validator.yml b/.github/workflows/renovate-config-validator.yml deleted file mode 100644 index 0f51def..0000000 --- a/.github/workflows/renovate-config-validator.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Validate renovate config - -on: - pull_request: - branches: - - main - push: - branches: - - main - -jobs: - validate: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 - - name: Validate - uses: rinchsan/renovate-config-validator@1ea1e8514f6a33fdd71c40b0a5fa3512b9e7b936 # tag=v0.0.12 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..bbab463 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +default_stages: [commit] +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: trailing-whitespace + + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.1.0 + hooks: + - id: prettier + types_or: [markdown, yaml] + + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.27.3 + hooks: + - id: check-renovate + name: validate renovate config diff --git a/README.md b/README.md index d34a0a8..3c9cd3b 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ Check [docs.renovatebot.com/config-presets](https://docs.renovatebot.com/config- Renovate will open a „Dependency Dashboard“ issue in each repository, tracking outstanding or rejected updates. This issue will have three sections: -* **Awaiting Schedule**: renovate has detected an update, but has not yet run during the scheduled time to open Pull Requests (see the `schedule` configuration) -* **Open**: There is an open Pull Request for those updates -* **Ignored or Blocked**: Those updates are blocked because the existing Pull Request was closed. +- **Awaiting Schedule**: renovate has detected an update, but has not yet run during the scheduled time to open Pull Requests (see the `schedule` configuration) +- **Open**: There is an open Pull Request for those updates +- **Ignored or Blocked**: Those updates are blocked because the existing Pull Request was closed. ### Simple @@ -37,14 +37,14 @@ When adding an extension, always use the `description` field to give a short sum ### Team/project presets +:warning: Note that this repository is public. If you need to add internal configuration, talk to the Platform team on Slack. + You can add presets to this repository. Please name them accordingly, e.g. `infrastructure.json` for an infrastructure team specific config. To ensure global defaults are included, please extend the `default.json` in that preset. If you want to add another label, your config could look like this: ```json { "description": "Custom configuration for infrastructure team that will add other labels then the default", - "labels": [ - "different-label" - ] + "labels": ["different-label"] } ``` @@ -54,7 +54,10 @@ To use this preset, you will then set the following in `renovate.json` in your r ```json { - "extends": ["github>anaconda/renovate-config", "github>anaconda/renovate-config:infrastructure"] + "extends": [ + "github>anaconda/renovate-config", + "github>anaconda/renovate-config:infrastructure" + ] } ``` @@ -68,5 +71,5 @@ There are also [presets](https://docs.renovatebot.com/presets-default/) you can Common settings you might want to change are: -* [`schedule`](https://docs.renovatebot.com/configuration-options/#schedule): Specifies when renovate runs -* [`labels`](https://docs.renovatebot.com/configuration-options/#labels): Add labels to the PR. +- [`schedule`](https://docs.renovatebot.com/configuration-options/#schedule): Specifies when renovate runs +- [`labels`](https://docs.renovatebot.com/configuration-options/#labels): Add labels to the PR. diff --git a/default.json b/default.json index 1e0a7b5..fc412e8 100644 --- a/default.json +++ b/default.json @@ -88,7 +88,7 @@ } ], "schedule": [ - "before 6am every weekday" + "every weekday before noon" ], "semanticCommits": "enabled", "timezone": "UTC" diff --git a/docs/Dockerfile.md b/docs/Dockerfile.md index 14bbb67..4955ca4 100644 --- a/docs/Dockerfile.md +++ b/docs/Dockerfile.md @@ -2,7 +2,7 @@ To upgrade dependencies in a `Dockerfile` that are not automatically recognized, there is a configuration using regex matching. -You need to define your dependency version as an `ENV` var and then use it later on. The env variable name *must* end in `_VERSION`. +You need to define your dependency version as an `ENV` var and then use it later on. The env variable name _must_ end in `_VERSION`. An example: @@ -17,5 +17,5 @@ RUN curl -L -O https://repo.continuum.io/miniconda/Miniconda3-py38_${MINICONDA_V The `# renovate: datasource=github-tags depName=conda/conda` tells renovate which -* [`datasource`](https://docs.renovatebot.com/modules/datasource/) to use, check the linked docs for all datasource you can use. -* `depName` to use. This is the name of the dependency and specific for the datasource. For e.g. GitHub, it is `{organization}/{repository}`. +- [`datasource`](https://docs.renovatebot.com/modules/datasource/) to use, check the linked docs for all datasource you can use. +- `depName` to use. This is the name of the dependency and specific for the datasource. For e.g. GitHub, it is `{organization}/{repository}`. diff --git a/docs/conda-environment.md b/docs/conda-environment.md index c84cec6..ceb9c9a 100644 --- a/docs/conda-environment.md +++ b/docs/conda-environment.md @@ -2,9 +2,9 @@ Renovate has a conda datasource already, so we can manually tag dependencies to use it. -To do so, you need to add the line `# renovate: datasource=conda depName=${channel}/${dependency}` *directly above* the line with your dependency. +To do so, you need to add the line `# renovate: datasource=conda depName=${channel}/${dependency}` _directly above_ the line with your dependency. -You can also capture pypi dependencies by placing the line `# renovate: datasource=pypi` *directly above* the line with your dependency +You can also capture pypi dependencies by placing the line `# renovate: datasource=pypi` _directly above_ the line with your dependency Note: You must specify the exact current version of your conda dependency before Renovate will recognize available upgrades @@ -27,6 +27,6 @@ dependencies: - yapf=0.31.0 - pip - pip: - # renovate: datasource=pypi - - uvicorn==0.17.6 + # renovate: datasource=pypi + - uvicorn==0.17.6 ``` diff --git a/docs/tflint-plugins.md b/docs/tflint-plugins.md index 83bc939..4eb50fb 100644 --- a/docs/tflint-plugins.md +++ b/docs/tflint-plugins.md @@ -2,7 +2,6 @@ Annotate your `.tflint.hcl` file as follows: - ```hcl plugin "aws" { enabled = true