renovate/lib/modules/datasource/git-refs
Sebastian Poxhofer 3681b2a945
chore: eslint to enforce for typed imports (#30844)
2024-08-19 13:15:27 +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 refactor(cache): Restrict type for package cache namespaces (#27121) 2024-02-08 07:35:41 +00:00
index.spec.ts chore: eslint to enforce for typed imports (#30844) 2024-08-19 13:15:27 +00:00
index.ts feat(datasource): `sourceUrl` & `releaseTimestamp` support (#29122) 2024-05-21 07:04:12 +00:00
readme.md docs: use relative links (#26044) 2023-11-29 18:10:17 +00:00
types.ts refactor: lib/modules (#14488) 2022-03-04 09:04:02 +01:00

readme.md

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