commit | 47145d86482aa41eeda67c7033a1092c5dfe6c85 | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Thu Sep 16 01:28:04 2021 +0100 |
committer | Luca Milanesio <luca.milanesio@gmail.com> | Thu Sep 23 18:59:45 2021 +0000 |
tree | 9e44f712df5611938e641d19e7b187d28eb27e8e | |
parent | 62e0be5127a2dd33e15dc954974ce95768498719 [diff] |
Do not expose cache-automerge refs Change-Id: I0dc28f7f73034b0198da304284b12a0469f63cb2
Gerrit lib module to allow filtering out refs in the Git advertizing protocol phase.
Build this module as it was a Gerrit plugin:
git-refs-filter
directory to Gerrit /plugins/git-refs-filter
bazel build plugins/git-refs-filter
bazel test plugins/git-refs-filter:git_refs_filter_tests
git-refs-filter.jar
module is generated under /bazel-genfiles/plugins/git-refs-filter/
Copy git-refs-filter.jar
library to Gerrit /lib
and add the following one extra settings to gerrit.config
:
[gerrit] installModule = com.googlesource.gerrit.modules.gitrefsfilter.RefsFilterModule
The refsfilter module defines a new global capability called “Filter out closed changes refs”. By default the capability isn't assigned to any user or group, thus the module installation has no side effects.
Filtering a closed change refs has the following meaning:
To enable a group of users of getting a “filtered list” of refs (e.g. CI jobs):
NOTE Gerrit makes a super-simplified ACL evaluation if all the projects are globally readable (e.g. project has a READ rule to refs/*). To enable the closed changes filtering you need to disable any global read rule for the group that needs refs filtering.