0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-05-13 08:01:49 +00:00
renovatebot_renovate/lib/modules/datasource/git-refs/readme.md
RahulGautamSingh bc7d0595d0
feat(config): managerFilePatterns (#34615)
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-05-04 08:30:24 +00:00

28 lines
1 KiB
Markdown

You can use this datasource plus [regex managers](../../manager/regex/index.md) to update git-based dependencies that are not natively supported by Renovate.
The `git-refs` datasource returns a reference from a Git repository.
The `packageName` must be a fully qualified domain name.
To fetch the latest _digest_ of a reference instead of the named reference: put the named reference in `currentValue` and match on the `currentDigest`.
**Usage example**
Say you want to maintain the `HEAD` digest of the `master` branch of a repository.
You would configure a custom manager in your Renovate config file for files named `versions.ini`:
```json
{
"customManagers": [
{
"customType": "regex",
"managerFilePatterns": ["/^versions.ini$/"],
"matchStrings": ["GOOGLE_API_VERSION=(?<currentDigest>.*?)\\n"],
"currentValueTemplate": "master",
"depNameTemplate": "googleapis",
"packageNameTemplate": "https://github.com/googleapis/googleapis",
"datasourceTemplate": "git-refs"
}
]
}
```