commit | 13fec68f1440b3cbd9f21c345f90ceaa94f838b0 | [log] [tgz] |
---|---|---|
author | Edwin Kempin <ekempin@google.com> | Wed Jan 20 11:21:57 2021 +0100 |
committer | Edwin Kempin <ekempin@google.com> | Tue Jan 26 10:22:32 2021 +0100 |
tree | 02362039962ab74434eee7655328baf74810c68f | |
parent | 0071e0028f7b8c20b7a92a15c1799482269e87e3 [diff] |
Add change message with the owned files when code owner is added as reviewer When a code owner is added as a reviewer add a change message that lists the paths that are owned by this user. This way it gets transparent which files can be approved by this reviewer. Gerrit core doesn’t add a change message when a reviewer is added to a change. Hence there is no message that we can extend, but we rather must post our own change message. The paths in the change message are absolute file paths. They do not have a leading '/' so that they match the paths in the file list on the change screen which also do not have a leading '/'. Example change message: "John Doe who was added as reviewer owns the following files: * foo/bar.baz * foo/baz.bar * foo/bar/baz.foo" Same as for the message posted by CodeOwnersOnPostReview the 'plugin.code-owners.maxPathsInChangeMessages' configuration parameter limits the paths that are included into the message. The change message is posted with a autogenerated tag so that these messages do not show up by default on the change screen, as they may be perceived as too verbose otherwise. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: Ifc79fce2ba5e8295a9c4b66feaa959245cbe7cc9
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.
Also see resources/Documentation/about.md
IMPORTANT: Before installing/enabling the plugin follow the instructions from the setup guide, see resources/Documentation/setup-guide.md