0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-05-12 23:51:55 +00:00
renovatebot_renovate/lib/modules/datasource/git-refs
2025-05-09 11:31:00 +00:00
..
__fixtures__ refactor: lib/modules (#14488) 2022-03-04 09:04:02 +01:00
__snapshots__ test: migrate to vitest (#34475) 2025-02-26 09:35:54 +00:00
base.ts fix: properly pass configured env (#35835) 2025-05-09 11:31:00 +00:00
index.spec.ts test: cleanup (#34785) 2025-03-13 17:52:09 +00:00
index.ts fix: improve coverage (#34667) 2025-03-06 17:05:19 +00:00
readme.md feat(config): managerFilePatterns (#34615) 2025-05-04 08:30:24 +00:00
types.ts refactor: lib/modules (#14488) 2022-03-04 09:04:02 +01:00

You can use this datasource plus regex managers 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:

{
  "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"
    }
  ]
}