Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
5eb70d30
Commit
5eb70d30
authored
7 years ago
by
Craig Tiller
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #11828 from ctiller/mosiblings
Fix a few bugs in mkowners
parents
ee0c71eb
98240d07
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.github/CODEOWNERS
+3
-2
3 additions, 2 deletions
.github/CODEOWNERS
OWNERS
+2
-0
2 additions, 0 deletions
OWNERS
examples/objective-c/OWNERS
+2
-0
2 additions, 0 deletions
examples/objective-c/OWNERS
tools/mkowners/mkowners.py
+24
-6
24 additions, 6 deletions
tools/mkowners/mkowners.py
with
31 additions
and
8 deletions
.github/CODEOWNERS
+
3
−
2
View file @
5eb70d30
...
...
@@ -2,17 +2,20 @@
# Uses OWNERS files in different modules throughout the
# repository as the source of truth for module ownership.
/**
@a11r
@nicolasnoble
@ctiller
/*.podspec
@muxi
@makdharma
@a11r
@nicolasnoble
@ctiller
/binding.gyp
@murgatroid99
@a11r
@nicolasnoble
@ctiller
/Gemfile
@murgatroid99
@a11r
@nicolasnoble
@ctiller
/grpc.gemspec
@murgatroid99
@a11r
@nicolasnoble
@ctiller
/package.json
@murgatroid99
@a11r
@nicolasnoble
@ctiller
/Rakefile
@murgatroid99
@a11r
@nicolasnoble
@ctiller
/grpc.bzl
@muxi
@makdharma
@a11r
@nicolasnoble
@ctiller
/bazel/**
@nicolasnoble
@dgquintas
@ctiller
/cmake/**
@jtattermusch
@a11r
@nicolasnoble
@ctiller
/doc/PROTOCOL-HTTP2.md
@ejona86
@a11r
@nicolasnoble
@ctiller
/doc/interop-test-descriptions.md
@ejona86
@a11r
@nicolasnoble
@ctiller
/etc/**
@jboeuf
@nicolasnoble
@a11r
@ctiller
/examples/node/**
@murgatroid99
@a11r
@nicolasnoble
@ctiller
/examples/objective-c/**
@muxi
@makdharma
@a11r
@nicolasnoble
@ctiller
/examples/python/**
@nathanielmanistaatgoogle
@kpayson64
@mehrdada
/include/**
@ctiller
@markdroth
@dgquintas
@a11r
@nicolasnoble
/src/core/**
@ctiller
@markdroth
@dgquintas
...
...
@@ -34,7 +37,5 @@
/tools/**
@matt-kwong
@jtattermusch
@nicolasnoble
@a11r
@ctiller
/tools/codegen/core/**
@ctiller
@dgquintas
@markdroth
/tools/distrib/python/**
@nathanielmanistaatgoogle
@kpayson64
@mehrdada
/tools/dockerfile/**
@matt-kwong
@jtattermusch
@nicolasnoble
@a11r
@ctiller
/tools/run_tests/**
@matt-kwong
@jtattermusch
@nicolasnoble
@a11r
@ctiller
/tools/run_tests/artifacts/*_node*
@murgatroid99
@matt-kwong
@jtattermusch
@nicolasnoble
@a11r
@ctiller
/tools/run_tests/helper_scripts/*_node*
@murgatroid99
@matt-kwong
@jtattermusch
@nicolasnoble
@a11r
@ctiller
This diff is collapsed.
Click to expand it.
OWNERS
+
2
−
0
View file @
5eb70d30
...
...
@@ -5,3 +5,5 @@
@ctiller
@murgatroid99 binding.gyp Gemfile grpc.gemspec package.json Rakefile
@muxi *.podspec grpc.bzl
@makdharma *.podspec grpc.bzl
This diff is collapsed.
Click to expand it.
examples/objective-c/OWNERS
0 → 100644
+
2
−
0
View file @
5eb70d30
@muxi
@makdharma
This diff is collapsed.
Click to expand it.
tools/mkowners/mkowners.py
+
24
−
6
View file @
5eb70d30
...
...
@@ -132,7 +132,7 @@ def git_glob(glob):
global
gg_cache
if
glob
in
gg_cache
:
return
gg_cache
[
glob
]
r
=
set
(
subprocess
.
check_output
([
'
git
'
,
'
ls-files
'
,
glob
])
.
check_output
([
'
git
'
,
'
ls-files
'
,
os
.
path
.
join
(
git_root
,
glob
)
])
.
decode
(
'
utf-8
'
)
.
strip
()
.
splitlines
())
...
...
@@ -150,7 +150,7 @@ def expand_directives(root, directives):
globs
[
glob
].
append
(
directive
.
who
)
# expand owners for intersecting globs
sorted_globs
=
sorted
(
globs
.
keys
(),
key
=
lambda
g
:
len
(
git_glob
(
os
.
path
.
join
(
root
,
g
))),
key
=
lambda
g
:
len
(
git_glob
(
full_dir
(
root
,
g
))),
reverse
=
True
)
out_globs
=
collections
.
OrderedDict
()
for
glob_add
in
sorted_globs
:
...
...
@@ -162,8 +162,9 @@ def expand_directives(root, directives):
files_have
=
git_glob
(
full_dir
(
root
,
glob_have
))
intersect
=
files_have
.
intersection
(
files_add
)
if
intersect
:
for
f
in
files_add
:
for
f
in
sorted
(
files_add
):
# sorted to ensure merge stability
if
f
not
in
intersect
:
print
(
"
X
"
,
root
,
glob_add
,
glob_have
)
out_globs
[
os
.
path
.
relpath
(
f
,
start
=
root
)]
=
who_add
for
who
in
who_have
:
if
who
not
in
out_globs
[
glob_add
]:
...
...
@@ -182,8 +183,9 @@ def add_parent_to_globs(parent, globs, globs_dir):
intersect
=
files_parent
.
intersection
(
files_child
)
gglob_who_orig
=
gglob_who
.
copy
()
if
intersect
:
for
f
in
files_child
:
for
f
in
sorted
(
files_child
):
# sorted to ensure merge stability
if
f
not
in
intersect
:
print
(
"
Y
"
,
full_dir
(
owners
.
dir
,
oglob
),
full_dir
(
globs_dir
,
gglob
))
who
=
gglob_who_orig
.
copy
()
globs
[
os
.
path
.
relpath
(
f
,
start
=
globs_dir
)]
=
who
for
who
in
oglob_who
:
...
...
@@ -199,6 +201,7 @@ with open(args.out, 'w') as out:
out
.
write
(
'
# Auto-generated by the tools/mkowners/mkowners.py tool
\n
'
)
out
.
write
(
'
# Uses OWNERS files in different modules throughout the
\n
'
)
out
.
write
(
'
# repository as the source of truth for module ownership.
\n
'
)
written_globs
=
[]
while
todo
:
head
,
*
todo
=
todo
if
head
.
parent
and
not
head
.
parent
in
done
:
...
...
@@ -207,6 +210,21 @@ with open(args.out, 'w') as out:
globs
=
expand_directives
(
head
.
dir
,
head
.
directives
)
add_parent_to_globs
(
head
.
parent
,
globs
,
head
.
dir
)
for
glob
,
owners
in
globs
.
items
():
out
.
write
(
'
/%s %s
\n
'
%
(
full_dir
(
head
.
dir
,
glob
),
'
'
.
join
(
owners
)))
skip
=
False
for
glob1
,
owners1
,
dir1
in
reversed
(
written_globs
):
files
=
git_glob
(
full_dir
(
head
.
dir
,
glob
))
files1
=
git_glob
(
full_dir
(
dir1
,
glob1
))
intersect
=
files
.
intersection
(
files1
)
if
files
==
intersect
:
if
sorted
(
owners
)
==
sorted
(
owners1
):
skip
=
True
# nothing new in this rule
break
elif
intersect
:
# continuing would cause a semantic change since some files are
# affected differently by this rule and CODEOWNERS is order dependent
break
if
not
skip
:
out
.
write
(
'
/%s %s
\n
'
%
(
full_dir
(
head
.
dir
,
glob
),
'
'
.
join
(
owners
)))
written_globs
.
append
((
glob
,
owners
,
head
.
dir
))
done
.
add
(
head
.
dir
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment