commit | 23cc86cdeffcdc8907fdfce3dcd2a1afe8bee099 | [log] [tgz] |
---|---|---|
author | David Ostrovsky <david@ostrovsky.org> | Fri Jan 31 19:13:05 2020 +0100 |
committer | David Ostrovsky <david@ostrovsky.org> | Sat Feb 01 08:46:42 2020 +0100 |
tree | 0bfce067dc562cdb627aece75e62355abf52556f | |
parent | f7e73ec0bbf0f4d36ba61c8a008f051d918189f5 [diff] |
Adjust to core moving to List interface for ref filtering Change I1f60c3ca0 changed the API to List interface for ref filtering. Change-Id: I90e73625bd8276e13cf373ad9360b5658cb61516
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.
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.