Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
20754c0f
Commit
20754c0f
authored
Oct 28, 2016
by
Ryan Hitchman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve update_owners.py username detection and error message.
Also, skip _output.
parent
bc7ae399
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
update_owners.py
hack/update_owners.py
+6
-6
main.go
test/list/main.go
+2
-1
No files found.
hack/update_owners.py
View file @
20754c0f
...
@@ -116,12 +116,12 @@ def get_maintainers():
...
@@ -116,12 +116,12 @@ def get_maintainers():
def
detect_github_username
():
def
detect_github_username
():
remotes
=
subprocess
.
check_output
([
'git'
,
'remote'
,
'-v
'
])
origin_url
=
subprocess
.
check_output
([
'git'
,
'config'
,
'remote.origin.url
'
])
repos
=
set
(
re
.
findall
(
r'\w+(?=/kubernetes)'
,
remotes
)
)
m
=
re
.
search
(
r'github.com[:/](.*)/'
,
origin_url
)
repos
.
remove
(
'kubernetes'
)
if
m
and
m
.
group
(
1
)
!=
'kubernetes'
:
if
len
(
repos
)
==
1
:
return
m
.
group
(
1
)
return
repos
.
pop
()
raise
ValueError
(
'unable to determine GitHub user from '
raise
ValueError
(
'unable to guess GitHub user from `git remote -v` output, use
--user instead'
)
'`git config remote.origin.url` output, run with
--user instead'
)
def
main
():
def
main
():
...
...
test/list/main.go
View file @
20754c0f
...
@@ -237,7 +237,8 @@ func (t *testList) handlePath(path string, info os.FileInfo, err error) error {
...
@@ -237,7 +237,8 @@ func (t *testList) handlePath(path string, info os.FileInfo, err error) error {
return
err
return
err
}
}
if
strings
.
Contains
(
path
,
"third_party"
)
||
if
strings
.
Contains
(
path
,
"third_party"
)
||
strings
.
Contains
(
path
,
"staging"
)
{
strings
.
Contains
(
path
,
"staging"
)
||
strings
.
Contains
(
path
,
"_output"
)
{
return
filepath
.
SkipDir
return
filepath
.
SkipDir
}
}
if
strings
.
HasSuffix
(
path
,
".go"
)
&&
strings
.
Contains
(
path
,
"e2e"
)
||
if
strings
.
HasSuffix
(
path
,
".go"
)
&&
strings
.
Contains
(
path
,
"e2e"
)
||
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment