commit | 1e8fa768cb112bae29394f1eca6433a959b793ba | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Wed Jun 19 19:19:24 2024 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Wed Jun 19 19:19:24 2024 +0100 |
tree | d6dd1ec9f66852443c72f19f72e197cdb3e2204b | |
parent | a6a057dfd1375747bdf5de90e960d35468f0e4a0 [diff] |
Use '(state:active OR state:read-only)' when querying projects Gerrit supports empty projects query only from v3.9 onwards, whilst for earlier versions the NumberOfProjectsCollector needs to rely on a query that would match any project state. Using an empty query would make the git-repo-metrics fail on earlier Gerrit versions. Change-Id: Ifd0a72a73ab48d4e72868f6f38b14fd526f5ea28
This plugin allows a systematic collection of repository metrics. Metrics are updated upon a ref-update
receive.
Clone or link this plugin to the plugins directory of Gerrit‘s source tree, and then run bazel build on the plugin’s directory.
Example:
git clone --recursive https://gerrit.googlesource.com/gerrit git clone https://gerrit.googlesource.com/plugins/git-repo-metrics pushd gerrit/plugins && ln -s ../../git-repo-metrics . && popd cd gerrit && bazel build plugins/git-repo-metrics
The output plugin jar is created in:
bazel-genfiles/plugins/git-repo-metrics/git-repo-metrics.jar
Copy the git-repo-metrics.jar into the Gerrit's /plugins directory and wait for the plugin to be automatically loaded.
More information about the plugin configuration can be found in the config.md file.