(self)
Common information update steps of the repository.
Common information update steps of the repository.
Common information update steps of the repository .
async def common_update(self):
        """Common information update steps of the repository."""
        # Attach logger
        if self.logger is None:
            self.logger = Logger(
                f"hacs.repository.{self.information.category}.{self.information.full_name}"
            )

        # Attach repository
        self.repository_object = await self.github.get_repo(self.information.full_name)

        # Update description
        if self.repository_object.description:
            self.information.description = self.repository_object.description

        # Update default branch
        if self.information.full_name != "custom-components/hacs":
            self.information.default_branch = self.repository_object.default_branch
        else:
            self.information.default_branch = "next"

        # Update last available commit
        await self.repository_object.set_last_commit()
        self.versions.available_commit = self.repository_object.last_commit

        # Update last updaeted
        self.information.last_updated = self.repository_object.pushed_at

        # Update topics
        self.information.topics = self.repository_object.topics

        # Update "info.md"
        await self.get_info_md_content()

        # Update releases
        await self.get_releases()
async def common_update ( self ) : # Attach logger if self . logger is None : self . logger = Logger ( f"hacs.repository.{self.information.category}.{self.information.full_name}" ) # Attach repository self . repository_object = await self . github . get_repo ( self . information . full_name ) # Update description if self . repository_object . description : self . information . description = self . repository_object . description # Update default branch if self . information . full_name != "custom-components/hacs" : self . information . default_branch = self . repository_object . default_branch else : self . information . default_branch = "next" # Update last available commit await self . repository_object . set_last_commit ( ) self . versions . available_commit = self . repository_object . last_commit # Update last updaeted self . information . last_updated = self . repository_object . pushed_at # Update topics self . information . topics = self . repository_object . topics # Update "info.md" await self . get_info_md_content ( ) # Update releases await self . get_releases ( )