Beispiel #1
0
 def __init__(self, git_url, email, schema_type):
     super(Repo, self).__init__()
     parsed_git = giturlparse.parse(git_url)
     self.git_url = git_url
     self.owner = parsed_git.owner
     self.name = parsed_git.name
     self.email = email
     self.git_repo = None
     self.current_tag = None
     self.cache_latest_valid_tag = None
     if schema_type not in self.SCHEMA_TYPES:
         raise exceptions.InvalidSchemaTypeException(
             self,
             "`%s` is not a supported schema type. Supported: %s"
             % (schema_type, ",".join(self.SCHEMA_TYPES)),
         )
     self.schema_type = schema_type
Beispiel #2
0
 def __init__(self, git_url, email, schema_type, external_doc,
              external_tool):
     super(Repo, self).__init__()
     parsed_git = giturlparse.parse(git_url)
     self.git_url = git_url
     self.owner = self.find_owner(parsed_git)
     self.name = parsed_git.name
     self.email = email
     self.external_doc = external_doc
     self.external_tool = external_tool
     if os.path.isdir(self.clone_dir):
         self.git_repo = GitRepo(self.clone_dir)
     else:
         self.git_repo = None
     self.current_tag = None
     self.cache_latest_valid_tag = None
     if schema_type not in self.SCHEMA_TYPES:
         raise exceptions.InvalidSchemaTypeException(
             self,
             "`%s` is not a supported schema type. Supported: %s" %
             (schema_type, ",".join(self.SCHEMA_TYPES)),
         )
     self.schema_type = schema_type