Files
renovate/lib/modules/datasource/git-refs
Dave e10a96bfd0 refactor: centralize SimpleGit creation (#43035)
* central function for creating SimpleGit instance

* Updated tests.

* Set the LANG and LC_ALL environment variables for all Git operations instead of just initRepo.

* Moved GIT_SSH_COMMAND to `createSimpleGit` function.

* Removed unnecessary custom env vars.
2026-05-11 15:05:08 +00:00
..
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"
    }
  ]
}