Seed some owners in front_end
The proposed owners are based on reviewing and authoring contributions
in individual folders in the past six months.
The script used to find these owners is attached.
Bug: chromium:1082687
Change-Id: I8efc3fee3298be615acb7fc2497309ae560a913c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2199083
Reviewed-by: Shane Clifford <shanejc@microsoft.com>
Reviewed-by: Leo Lee <leolee@microsoft.com>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
diff --git a/front_end/Images/OWNERS b/front_end/Images/OWNERS
new file mode 100644
index 0000000..852d438
--- /dev/null
+++ b/front_end/Images/OWNERS
@@ -0,0 +1 @@
+file://COMMON_OWNERS
diff --git a/front_end/bindings/OWNERS b/front_end/bindings/OWNERS
new file mode 100644
index 0000000..2ca8b2d
--- /dev/null
+++ b/front_end/bindings/OWNERS
@@ -0,0 +1,13 @@
+aerotwist@chromium.org
+bmeurer@chromium.org
+jacktfranklin@chromium.org
+joselea@microsoft.com
+leese@chromium.org
+lomitch@microsoft.com
+mathias@chromium.org
+petermarshall@chromium.org
+pfaffe@chromium.org
+Rob.Paveza@microsoft.com
+sigurds@chromium.org
+szuend@chromium.org
+tvanderlippe@chromium.org
diff --git a/front_end/emulation/OWNERS b/front_end/emulation/OWNERS
new file mode 100644
index 0000000..82cc8eb
--- /dev/null
+++ b/front_end/emulation/OWNERS
@@ -0,0 +1,11 @@
+aerotwist@chromium.org
+alexrudenko@chromium.org
+changhaohan@chromium.org
+jacktfranklin@chromium.org
+mathias@chromium.org
+petermarshall@chromium.org
+Rob.Paveza@microsoft.com
+szuend@chromium.org
+tvanderlippe@chromium.org
+wolfi@chromium.org
+yangguo@chromium.org
diff --git a/front_end/inline_editor/OWNERS b/front_end/inline_editor/OWNERS
new file mode 100644
index 0000000..646c883
--- /dev/null
+++ b/front_end/inline_editor/OWNERS
@@ -0,0 +1,7 @@
+aerotwist@chromium.org
+jacktfranklin@chromium.org
+kahinds@microsoft.com
+khamu@microsoft.com
+mathias@chromium.org
+Rob.Paveza@microsoft.com
+tvanderlippe@chromium.org
diff --git a/front_end/lighthouse/OWNERS b/front_end/lighthouse/OWNERS
index adbdad6..fc4df01 100644
--- a/front_end/lighthouse/OWNERS
+++ b/front_end/lighthouse/OWNERS
@@ -1 +1,2 @@
file://LIGHTHOUSE_OWNERS
+file://INFRA_OWNERS
diff --git a/front_end/main/OWNERS b/front_end/main/OWNERS
new file mode 100644
index 0000000..0473ec1
--- /dev/null
+++ b/front_end/main/OWNERS
@@ -0,0 +1,12 @@
+aerotwist@chromium.org
+brcui@microsoft.com
+jacktfranklin@chromium.org
+jalyn@microsoft.com
+joselea@microsoft.com
+mandy.chen@microsoft.com
+mathias@chromium.org
+Rob.Paveza@microsoft.com
+sigurds@chromium.org
+szuend@chromium.org
+tvanderlippe@chromium.org
+vidorteg@microsoft.com
diff --git a/front_end/resources/OWNERS b/front_end/resources/OWNERS
new file mode 100644
index 0000000..7638d40
--- /dev/null
+++ b/front_end/resources/OWNERS
@@ -0,0 +1,13 @@
+aerotwist@chromium.org
+brgoddar@microsoft.com
+changhaohan@chromium.org
+jacktfranklin@chromium.org
+janscheffler@chromium.org
+joselea@microsoft.com
+mathias@chromium.org
+michael.liao@microsoft.com
+petermarshall@chromium.org
+Rob.Paveza@microsoft.com
+sigurds@chromium.org
+szuend@chromium.org
+tvanderlippe@chromium.org
diff --git a/front_end/sdk/OWNERS b/front_end/sdk/OWNERS
new file mode 100644
index 0000000..9dac427
--- /dev/null
+++ b/front_end/sdk/OWNERS
@@ -0,0 +1,20 @@
+aerotwist@chromium.org
+alexrudenko@chromium.org
+bmeurer@chromium.org
+changhaohan@chromium.org
+chrche@microsoft.com
+jacktfranklin@chromium.org
+janscheffler@chromium.org
+John.Emau@microsoft.com
+joselea@microsoft.com
+leese@chromium.org
+lomitch@microsoft.com
+mathias@chromium.org
+morlovich@chromium.org
+petermarshall@chromium.org
+pfaffe@chromium.org
+sigurds@chromium.org
+szuend@chromium.org
+tvanderlippe@chromium.org
+wolfi@chromium.org
+yangguo@chromium.org
diff --git a/front_end/text_editor/OWNERS b/front_end/text_editor/OWNERS
new file mode 100644
index 0000000..cd8a4d1
--- /dev/null
+++ b/front_end/text_editor/OWNERS
@@ -0,0 +1,8 @@
+aerotwist@chromium.org
+bmeurer@chromium.org
+leese@chromium.org
+mathias@chromium.org
+Rob.Paveza@microsoft.com
+szuend@chromium.org
+tvanderlippe@chromium.org
+wolfi@chromium.org
diff --git a/front_end/third_party/lighthouse/OWNERS b/front_end/third_party/lighthouse/OWNERS
index d23fdbf..fc4df01 100644
--- a/front_end/third_party/lighthouse/OWNERS
+++ b/front_end/third_party/lighthouse/OWNERS
@@ -1,2 +1,2 @@
-paulirish@chromium.org
-cjamcl@chromium.org
\ No newline at end of file
+file://LIGHTHOUSE_OWNERS
+file://INFRA_OWNERS
diff --git a/front_end/third_party/wasmparser/OWNERS b/front_end/third_party/wasmparser/OWNERS
new file mode 100644
index 0000000..11ae53a
--- /dev/null
+++ b/front_end/third_party/wasmparser/OWNERS
@@ -0,0 +1,5 @@
+bmeurer@chromium.org
+duongn@microsoft.com
+kimanh@chromium.org
+leese@chromium.org
+tvanderlippe@chromium.org
diff --git a/front_end/timeline/OWNERS b/front_end/timeline/OWNERS
new file mode 100644
index 0000000..20762c3
--- /dev/null
+++ b/front_end/timeline/OWNERS
@@ -0,0 +1,16 @@
+aerotwist@chromium.org
+brcui@microsoft.com
+brgoddar@microsoft.com
+changhaohan@chromium.org
+jacktfranklin@chromium.org
+jalyn@microsoft.com
+joselea@microsoft.com
+khamu@microsoft.com
+mathias@chromium.org
+michael.liao@microsoft.com
+mjackson@microsoft.com
+petermarshall@chromium.org
+Rob.Paveza@microsoft.com
+sigurds@chromium.org
+szuend@chromium.org
+tvanderlippe@chromium.org
diff --git a/front_end/timeline_model/OWNERS b/front_end/timeline_model/OWNERS
new file mode 100644
index 0000000..f99acc1
--- /dev/null
+++ b/front_end/timeline_model/OWNERS
@@ -0,0 +1,5 @@
+aerotwist@chromium.org
+bmeurer@chromium.org
+mathias@chromium.org
+szuend@chromium.org
+tvanderlippe@chromium.org
diff --git a/front_end/ui/OWNERS b/front_end/ui/OWNERS
new file mode 100644
index 0000000..6bf79a2
--- /dev/null
+++ b/front_end/ui/OWNERS
@@ -0,0 +1,25 @@
+aerotwist@chromium.org
+alexrudenko@chromium.org
+brcui@microsoft.com
+brgoddar@microsoft.com
+changhaohan@chromium.org
+chshrest@microsoft.com
+jacktfranklin@chromium.org
+jalyn@microsoft.com
+janscheffler@chromium.org
+John.Emau@microsoft.com
+joselea@microsoft.com
+kahinds@microsoft.com
+khamu@microsoft.com
+lomitch@microsoft.com
+mathias@chromium.org
+michael.liao@microsoft.com
+mjackson@microsoft.com
+petermarshall@chromium.org
+Rob.Paveza@microsoft.com
+shanejc@microsoft.com
+sigurds@chromium.org
+szuend@chromium.org
+tvanderlippe@chromium.org
+vidorteg@microsoft.com
+wolfi@chromium.org
diff --git a/scripts/suggest_owners.js b/scripts/suggest_owners.js
new file mode 100644
index 0000000..c18802e
--- /dev/null
+++ b/scripts/suggest_owners.js
@@ -0,0 +1,67 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Suggest owners based on authoring and reviewing contributions.
+// Usage: node suggest-owners.js <since-date> <path> [<cut-off>]
+const util = require('util');
+const exec = util.promisify(require('child_process').exec);
+
+(async function() {
+ const {stdout} =
+ await exec(`git log --numstat --since=${process.argv[2]} ${process.argv[3]}`, {maxBuffer: 1024 * 1024 * 128});
+ const structured_log = [];
+ // Parse git log into a list of commit objects.
+ for (const line of stdout.split('\n')) {
+ if (line.startsWith('commit')) {
+ // Start of a new commit
+ const match = /^commit (?<hash>\p{ASCII_Hex_Digit}+)/u.exec(line);
+ structured_log.push({
+ commit: match.groups.hash,
+ contributors: new Set(),
+ });
+ continue;
+ }
+ const commit = structured_log[structured_log.length - 1];
+ let match;
+ if ((match = line.match(/^Author: .*<(?<author>.+@.+\..+)>$/))) {
+ commit.contributors.add(match.groups.author);
+ } else if ((match = line.match(/Reviewed-by: .*<(?<reviewer>.+@.+\..+)>$/))) {
+ commit.contributors.add(match.groups.reviewer);
+ }
+ }
+
+ // Attribute commits to contributors.
+ const contributor_to_commits = new Map();
+ for (commit of structured_log) {
+ for (const contributor of commit.contributors) {
+ if (!contributor_to_commits.has(contributor)) {
+ contributor_to_commits.set(contributor, 1);
+ } else {
+ contributor_to_commits.set(contributor, contributor_to_commits.get(contributor) + 1);
+ }
+ }
+ }
+
+ // Output contributors.
+ let list = [];
+ for (const [contributor, commits] of contributor_to_commits) {
+ list.push({contributor, commits});
+ }
+ list.sort((a, b) => b.commits - a.commits);
+
+ const cutoff = parseInt(process.argv[4], 10) || 0;
+ if (cutoff > 0) {
+ // If there is a cut-off specified, sort the list by contributor.
+ list = list.filter(item => item.commits >= cutoff)
+ .sort((a, b) => a.contributor.toLowerCase().localeCompare(b.contributor.toLowerCase()));
+ for (const {contributor} of list) {
+ console.log(contributor);
+ }
+ } else {
+ // If there is no cut-off specified, sort the list by commit.
+ for (const {contributor, commits} of list) {
+ console.log(`${contributor.padEnd(30)}: ${String(commits).padStart(3)}`);
+ }
+ }
+})();