renovate/lib/modules/datasource/git-refs
2023-07-03 19:20:06 +00:00
..
__fixtures__ refactor: lib/modules (#14488) 2022-03-04 09:04:02 +01:00
__snapshots__ feat(git-refs/git-tags): support authentication for private git repositories (#22983) 2023-06-30 19:45:55 +00:00
base.ts feat(git-refs/git-tags): support authentication for private git repositories (#22983) 2023-06-30 19:45:55 +00:00
index.spec.ts test(git-refs/git-tags): add types to mocked objects (#23096) 2023-07-03 19:20:06 +00:00
index.ts fix(git-refs): gracefully ignore git-refs auth error (#16617) 2022-07-16 15:48:26 +02:00
readme.md refactor(datasource): use packageName and not depName for datasource lookups (#20474) 2023-03-10 09:34:40 +01:00
types.ts refactor: lib/modules (#14488) 2022-03-04 09:04:02 +01:00

This datasource can be used in combination with regex managers to keep dependencies up-to-date which are not specifically supported by Renovate.

This 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, specify the reference as the currentValue and match on the currentDigest.

Usage example

The following is an example where you would maintain the HEAD digest of the master branch of a repository. You would configure a generic regex manager in renovate.json for files named versions.ini:

{
  "regexManagers": [
    {
      "fileMatch": ["^versions.ini$"],
      "matchStrings": ["GOOGLE_API_VERSION=(?<currentDigest>.*?)\\n"],
      "currentValueTemplate": "master",
      "depNameTemplate": "googleapis",
      "packageNameTemplate": "https://github.com/googleapis/googleapis",
      "datasourceTemplate": "git-refs"
    }
  ]
}