Skip to content
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
2 changes: 2 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
labels: ["automerge-security-update"],
},
osvVulnerabilityAlerts: true,
// Kept inline (not via "local>.") because renovate-deps.py runs with
// --platform=local which cannot resolve local presets.
customManagers: [
{
customType: "regex",
Expand Down
24 changes: 8 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,28 +169,20 @@ Linters that don't support autofix (like lychee link checker) silently ignore th

## Automatic version updates with Renovate

To let Renovate automatically update the pinned flint version in your
`mise.toml`, add this custom manager to your `renovate.json5`:
Flint provides a [Renovate shareable preset](https://docs.renovatebot.com/config-presets/)
with custom managers that automatically update:

- **Pinned flint versions** in `mise.toml` (`raw.githubusercontent.com` URLs)
- **`_VERSION` variables** in `mise.toml` (e.g., `SUPER_LINTER_VERSION`)

Add this to your `renovate.json5`:

```json5
{
customManagers: [
{
customType: "regex",
description: "Update raw.githubusercontent.com version tags in mise.toml",
managerFilePatterns: ["/^mise\\.toml$/"],
matchStrings: [
"https://raw\\.githubusercontent\\.com/(?<depName>[^/]+/[^/]+)/(?<currentValue>v[^/]+)/",
],
datasourceTemplate: "github-tags",
},
],
extends: ["github>grafana/flint"],
}
```

This matches all `raw.githubusercontent.com` URLs in `mise.toml` and updates
the version tag (e.g., `v0.1.0`) when a new release is published.

## Per-repo configuration

Each task expects certain config files that your repository must provide. You only need the files for the tasks you adopt:
Expand Down
30 changes: 30 additions & 0 deletions default.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"description": "Renovate custom managers for repositories that use flint mise tasks",
"customManagers": [
{
"customType": "regex",
"description": "Update _VERSION variables in mise.toml",
"managerFilePatterns": ["/^mise\\.toml$/"],
"matchStrings": [
"# renovate: datasource=(?<datasource>[a-z-]+?)(?: depName=(?<depName>.+?))?(?: packageName=(?<packageName>.+?))?(?: versioning=(?<versioning>[a-z-]+?))?\\s.+?_VERSION=\"?(?<currentValue>[^@\"]+?)(?:@(?<currentDigest>sha256:[a-f0-9]+))?\"?\\s"
]
},
{
"customType": "regex",
"description": "Update raw.githubusercontent.com version tags in mise.toml",
"managerFilePatterns": ["/^mise\\.toml$/"],
"matchStrings": [
"https://raw\\.githubusercontent\\.com/(?<depName>[^/]+/[^/]+)/(?<currentValue>v[^/]+)/"
],
"datasourceTemplate": "github-tags"
}
],
"packageRules": [
{
"matchPackageNames": ["renovate"],
"description": "Only update renovate once a week",
"schedule": ["before 6am on Monday"]
}
]
}