Enable owners plugin

Allow anyone in the all-maintainers group to approve(+2) any change.
Enable the owners plugin on all repositories, and require approval from
at least one owner of all affected files.

Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/groups b/groups
index 09704cd..71917dd 100644
--- a/groups
+++ b/groups
@@ -3,3 +3,4 @@
 0bc64754b78802646ba7e84fefb836824f744905	Administrators
 global:Registered-Users                   	Registered Users
 global:Project-Owners                   	Project Owners
+github:openbmc/all-maintainers	github/openbmc/all-maintainers
diff --git a/project.config b/project.config
index 0af3201..9912eae 100644
--- a/project.config
+++ b/project.config
@@ -4,6 +4,7 @@
 	action = rebase if necessary
 [access "refs/heads/*"]
 	submit = group Registered Users
+	label-Code-Review = -2..+2 group github/openbmc/all-maintainers
 [access "refs/meta/config"]
 	label-Code-Review = -1..+1 group Registered Users
 	label-Verified = -1..+1 group Administrators
diff --git a/rules.pl b/rules.pl
new file mode 100644
index 0000000..afc6eeb
--- /dev/null
+++ b/rules.pl
@@ -0,0 +1,6 @@
+submit_rule(S) :-
+  gerrit:default_submit(D),
+  D =.. [submit | Ds],
+  findall(U, gerrit:commit_label(label('Code-Review', 2), U), Approvers),
+  gerrit_owners:add_owner_approval(Approvers, Ds, A),
+  S =.. [submit | A].