Add class for loading code owner configs from OWNERS files
The find-owners plugin reads code owner configurations from OWNERS files
that are stored in the source branches.
This change adds logic to the find-owners backend that can read such
files. Reading the files is implemented in the CodeOwnerConfigFile class
which is a subclass of VersionedMetaData. On load it reads and parses
the OWNERS file. The parsing is done by CodeOwnersConfigParser. After
the loading is done, callers can access the parsed CodeOwnerConfig.
CodeOwnerConfigFile will also be responsible for creating and updating
OWNERS files, but this part is not implemented yet (this will be done by
follow-up changes).
Since we have now more than one test, we introduce an abstract base
class for all code owner tests so that we do not need to repeat the
@TestPlugin annotation on all the test classes. The abstract base class
will also allow us to have the boilerplate code to instantiate code
owner API classes in a single place, so that not all code onwer tests
need to do this instantiation (this will be done only when the API
classes get implemented).
Signed-off-by: Edwin Kempin <ekempin@google.com>
Change-Id: If4bc673561665119dc06b5cc0896732cb5017523
8 files changed
tree: 0ddb110f4db6c0ebfc703500079a5252124d2f1b
-
java/
-
javatests/
-
resources/
-
.gitreview
-
BUILD
-
LICENSE
-
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