commit | f7e73ec0bbf0f4d36ba61c8a008f051d918189f5 | [log] [tgz] |
---|---|---|
author | Luca Milanesio <luca.milanesio@gmail.com> | Sat Jun 01 01:59:10 2019 +0100 |
committer | David Ostrovsky <david.ostrovsky@gmail.com> | Sat Feb 01 07:45:36 2020 +0000 |
tree | abbab73312c75f7a690e462acc5e727dc4cc48d9 | |
parent | 2de57f9c71d4273391e7751041f20b8b17090f15 [diff] |
Adapt to the latest allowCapability API change on master. Gerrit master refactored the way integration tests should configure global capabilities. Change-Id: Ia3ef6151cbb489da2aba09849cb1e3f2cf330784
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.