Add fetching of git/hg repositories

Review Request #9502 — Created Jan. 20, 2018 and updated

misery
ReviewBot
release-1.0.x
9498
5b01f07...
reviewbot

If there are a lot of ReviewBot 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 ReviewBot
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 ReviewBot finds all accessible
repositories are added correctly.

Tested with and without authentication.

  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

misery
misery
misery
misery
  1. 
      
  2. bot/reviewbot/repositories.py (Diff revision 3)
     
     
     

    TODO: needs to paginate here

    1. how to do that here??

    2. RBTools 1.0 has support to do this built in. If you upgrade the dependency to 1.0, you can iterate with one of the follwoing:

      for page in root.get_repositories(...).all_pages:
          for repository in page:
              # ...
      
      for repository in root.get_repositories(...).all_items:
          # ...
      
    3. Thank you very much!

  3. 
      
misery
Review request changed

Commit:

-92568a9b7eb2830f955e80b6547c09a8db4c49d1
+5b01f073dcc5d8767db22b5a0f5d24d200923028

Diff:

Revision 4 (+95 -12)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
Loading...