Add class that updates all code owner configs in a branch atomically

CodeOwnerConfigFileUpdateScanner scans a branch for code owner config
files and allows a callback to update them. The callback gets the plain
file content, which means that the code owner configs are not parsed.
Hence the callback also gets invoked for non-parseable code owner
configs. Updates to the code owner configs are committed atomically with
a single commit. In case of a no-op the branch is not updated.

In a follow-up change we will make use of
CodeOwnerConfigFileUpdateScanner to support replacing an email in all
code owner config files of a branch.

Change-Id: I2113ca172060ddfc97d548ddbbecef19aca5a7e2
Signed-off-by: Edwin Kempin <ekempin@google.com>
5 files changed
tree: 1ba8cd502ea23e75622a25b252b67d1b94c93554
  1. java/
  2. javatests/
  3. proto/
  4. resources/
  5. test/
  6. ui/
  7. .eslintrc.json
  8. .gitignore
  9. .gitreview
  10. bower.json
  11. BUILD
  12. LICENSE
  13. package-lock.json
  14. package.json
  15. README.md
README.md

Gerrit Code Review code-owners plugin

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