parameters: (self)
return_statement: return self.validate.success
docstring: Validate.
docstring_summary: Validate.
docstring_tokens: Validate .
function: async def validate_repository(self):
          """Validate."""
          await self.common_validate()
  
          # Custom step 1: Validate content.
          if self.data.content_in_root:
              self.content.path.remote = ""
  
          if self.content.path.remote == "custom_components":
              name = get_first_directory_in_directory(self.tree, "custom_components")
              if name is None:
                  raise HacsException(
                      f"Repostitory structure for {self.ref.replace('tags/','')} is not compliant"
                  )
              self.content.path.remote = f"custom_components/{name}"
  
          try:
              await get_integration_manifest(self)
          except HacsException as exception:
              if self.hacs.action:
                  raise HacsException(exception)
              self.logger.error(exception)
  
          # Handle potential errors
          if self.validate.errors:
              for error in self.validate.errors:
                  if not self.hacs.system.status.startup:
                      self.logger.error(error)
          return self.validate.success
function_tokens: async def validate_repository ( self ) : await self . common_validate ( ) # Custom step 1: Validate content. if self . data . content_in_root : self . content . path . remote = "" if self . content . path . remote == "custom_components" : name = get_first_directory_in_directory ( self . tree , "custom_components" ) if name is None : raise HacsException ( f"Repostitory structure for {self.ref.replace('tags/','')} is not compliant" ) self . content . path . remote = f"custom_components/{name}" try : await get_integration_manifest ( self ) except HacsException as exception : if self . hacs . action : raise HacsException ( exception ) self . logger . error ( exception ) # Handle potential errors if self . validate . errors : for error in self . validate . errors : if not self . hacs . system . status . startup : self . logger . error ( error ) return self . validate . success