commit | 67f458214c6dec62664f0dadbedfb318275c11ea | [log] [tgz] |
---|---|---|
author | Stan Stavarachi <stavarachi@google.com> | Wed Aug 14 01:22:12 2024 +0000 |
committer | Stan Stavarachi <stavarachi@google.com> | Wed Aug 14 01:23:01 2024 +0000 |
tree | 22f3ee152b46d793a7768221cd28dd2268f11040 | |
parent | 7bf7837120b194ff653c4b269d9ea28ee5678df4 [diff] |
Add code owner scorings to CodeOwnersInfo This will provide the scorings that are used to order code owners in the API response. Testing: Request: curl --user admin:pass http://localhost:8080/a/projects/test/branches/master/code_owners/data Response: { "code_owners": [ { "account": { "_account_id": 1000000 }, "scorings": { "DISTANCE": 0, "IS_EXPLICITLY_MENTIONED": 1 } } ], "owned_by_all_users": true, "code_owner_configs": [ { "project": "test", "branch": "refs/heads/master", "path": "/data/OWNERS" }, { "project": "test", "branch": "refs/heads/master", "path": "/OWNERS" } ] } Change-Id: I92e223d0de0f0d340930b8188b2b9c6f91464a8e Bug: Google b/349187606
This plugin provides support for defining code owners for files in a repository.
If the code-owners plugin is enabled, changes can only be submitted if all touched files are covered by approvals from code owners.
For a detailed description of the plugin functionality please refer to the plugin documentation.
IMPORTANT: Before installing/enabling the plugin follow the instructions from the setup guide.
NOTE: The plugin documentation only renders correctly when the plugin is installed in Gerrit and the documentation is accessed via https:///plugins/code-owners/Documentation/index.html. If you want to read the documentation before installing the plugin, you can find it properly rendered here.
From the root of the gerrit repository.
bazel test //plugins/code-owners/web:karma_test
For testing the plugin with the Gerrit FE Dev Helper the command below builds
bazel build //plugins/code-owners/web:code-owners ln -s bazel-bin/plugins/code-owners/web/code-owners.js polygerrit-ui/app/plugins/
and let the Dev Helper redirect from .+/plugins/code-owners/static/code-owners.js
to http://localhost:8081/plugins/code-owners.js
.