flake8
-
bot/reviewbot/repositories.py (Diff revision 1) Show all issues
Review Request #9502 — Created Jan. 20, 2018 and submitted
If there are a lot of Review Bot worker it will be
very expensive to maintain a repository configuration
manually. Since a reviewboard instance already knows
the configuration it is now be possible to configure
multiple reviewboard instances and let the Review Bot
fetch git and hg repositories automatically.If a repository has a "path" or "mirror_path" that
can be access locally or has a scheme starting with
"http" or "git" it will be added to known repository.
Added some repositories in reviewboard with path
and mirror_path. Some with non-existing local path
and mirror_path with "http" scheme.Saw that the Review Bot finds all accessible
repositories are added correctly.Tested with and without authentication.
Description | From | Last Updated |
---|---|---|
In your description and testing done, "ReviewBot" -> "Review Bot" |
|
|
W503 line break before binary operator |
![]() |
|
TODO: needs to paginate here |
|
|
Can we call this review_board_servers? |
|
|
Should be "Review Board" |
|
|
Same here. |
|
|
Let's say: If you have many workers and repositories, it may not be feasible to configure repositories by hand. You … |
|
|
How about "Automatically Fetch Repositories From Review Board" |
|
|
useable -> usable |
|
|
reviewboard -> Review Board server. |
|
|
Let's rewrite this to say: The repository path or mirror_path field must be the URL of a repository which is … |
|
|
Please add an "Args" section to this docstring. |
|
|
This should say tasks.py rather than celery.py |
|
|
Indent this one more space. |
|
|
Maybe switch the success/error cases here? |
|
|
Typo: useable -> usable |
|
|
Please add an "Args" section to this docstring. |
|
|
I'd rather keep this explicitly as "git" and not introduce the case insensitivity. |
|
|
Can be repo_type in ('hg', 'mercurial') (and probably should keep everything lower case) |
|
|
Can we call this fetch_repositories? |
|
|
url is missing. |
|
|
Instead of constructing a list, you can use a tuple here. |
|
|
Same here re: tuples vs lists. |
|
|
There might be ssh:// URLs too? If it isn't a file path, should we parse path and check (a) it … |
|
|
No blank line here. |
|
|
HTTP Technically, it could also be exposed over SSH, no? |
|
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+94 -11) |
rebase
Branch: |
|
||||
---|---|---|---|---|---|
Commit: |
|
||||
Diff: |
Revision 3 (+94 -11) |
Description: |
|
---|
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+95 -12) |
docs/reviewbot/configuration.rst (Diff revision 4) |
---|
Let's say:
If you have many workers and repositories, it may not be feasible to configure repositories by hand. You can also configure a list of Review Board servers to fetch all supported repositories from.
docs/reviewbot/configuration.rst (Diff revision 4) |
---|
How about "Automatically Fetch Repositories From Review Board"
docs/reviewbot/configuration.rst (Diff revision 4) |
---|
Let's rewrite this to say:
The repository
path
ormirror_path
field must be the URL of a repository which is accessible to the Review Bot worker. If you use a local file path for your repository and the worker is not running on the same host as the Review Board server, you must also expose the repository over http and set themirror_path
.This should probably also be a separate paragraph from the "manually configured repositories will override"
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+99 -12) |
bot/reviewbot/repositories.py (Diff revision 5) |
---|
I'd rather keep this explicitly as "git" and not introduce the case insensitivity.
bot/reviewbot/repositories.py (Diff revision 5) |
---|
Can be
repo_type in ('hg', 'mercurial')
(and probably should keep everything lower case)
Description: |
|
||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
||||||||||||||||||||||||||||||||||||
Commit: |
|
||||||||||||||||||||||||||||||||||||
Diff: |
Revision 6 (+118 -12) |
bot/reviewbot/repositories.py (Diff revision 6) |
---|
Instead of constructing a list, you can use a tuple here.
bot/reviewbot/repositories.py (Diff revision 6) |
---|
There might be ssh:// URLs too?
If it isn't a file path, should we parse
path
and check (a) it is a valid URL and (b) its scheme is in('http', 'https', 'ssh', 'git', 'git+ssh')
?
docs/reviewbot/configuration.rst (Diff revision 6) |
---|
HTTP
Technically, it could also be exposed over SSH, no?
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 7 (+120 -12) |
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 8 (+119 -12) |