renovate/lib/modules/platform/gerrit
Felipe Santos e22b96e7b3
fix(gerrit): `getBranchStatus` not returning `red` for failed checks (#32812)
2024-11-30 09:49:26 +00:00
..
client.spec.ts feat(gerrit): Reduce email notifications (#32817) 2024-11-30 05:51:52 +00:00
client.ts fix(gerrit): `getBranchStatus` not returning `red` for failed checks (#32812) 2024-11-30 09:49:26 +00:00
index.spec.ts fix(gerrit): `getBranchStatus` not returning `red` for failed checks (#32812) 2024-11-30 09:49:26 +00:00
index.ts fix(gerrit): `getBranchStatus` not returning `red` for failed checks (#32812) 2024-11-30 09:49:26 +00:00
readme.md fix(gerrit): improve commit message vs pr title workaround (#32115) 2024-11-12 05:54:01 +00:00
scm.spec.ts feat(gerrit): Reduce email notifications (#32817) 2024-11-30 05:51:52 +00:00
scm.ts feat(gerrit): Reduce email notifications (#32817) 2024-11-30 05:51:52 +00:00
types.ts fix(gerrit): `getBranchStatus` not returning `red` for failed checks (#32812) 2024-11-30 09:49:26 +00:00
utils.spec.ts feat(gerrit): use commit message footers to store source branch name (#29802) 2024-07-02 15:00:32 +00:00
utils.ts feat(gerrit): use commit message footers to store source branch name (#29802) 2024-07-02 15:00:32 +00:00

readme.md

Gerrit

Supported Gerrit versions

Renovate supports all Gerrit 3.x versions.

Support for Gerrit is currently experimental, meaning that it might still have some undiscovered bugs or design limitations, and that we might need to change functionality in a non-backwards compatible manner in a non-major release.

Renovate stores its metadata in the commit message footer.

Previously Renovate stored metadata in Gerrit's hashtags. To keep backwards compatibility, Renovate still reads metadata from hashtags. But Renovate always puts its metadata in the commit message footer! When the Renovate maintainers mark Gerrit support as stable, the maintainers will remove the "read metadata from hashtags" feature. This means changes without metadata in the commit message footer will be "forgotten" by Renovate.

Authentication

![Gerrit HTTP access token](../../../assets/images/gerrit-http-password.png){ loading=lazy }
First, create a HTTP access token for the Renovate account.

Let Renovate use your HTTP access token by doing one of the following:

  • Set your HTTP access token as a password in your config.js file, or
  • Set your HTTP access token as an environment variable RENOVATE_PASSWORD, or
  • Set your HTTP access token when you run Renovate in the CLI with --password=

The Gerrit user account must be allowed to assign the Code-Review label with "+2" to their own changes for "automerge" to work.

You must set platform=gerrit in your Renovate config file.

Renovate PR/Branch-Model with Gerrit and needed permissions

If you use the "Code-Review" label and want to get automerge working then you must set autoApprove=true in your Renovate config. Renovate will now add the Code-Review label with the value "+2" to each of its "pull requests" (Gerrit-Change).

!!! note The bot's user account must have permission to give +2 for the Code-Review label.

The Renovate option automergeType: "branch" makes no sense for Gerrit, because there are no branches used to create pull requests. It works similar to the default option "pr".

Optional features

You can use the statusCheckNames configuration to map any of the available branch checks (like minimumReleaseAge, mergeConfidence, and so on) to a Gerrit label.

For example, if you want to use the Merge Confidence feature and map the result of the Merge Confidence check to your Gerrit label "Renovate-Merge-Confidence" you can configure:

{
  "statusCheckNames": {
    "mergeConfidence": "Renovate-Merge-Confidence"
  }
}

Unsupported platform features/concepts

  • Creating issues (not a Gerrit concept)
  • Dependency Dashboard (needs issues first)