Closed in03 closed 1 year ago
def __init__(self, package_name: str, package_path: str): self.package_name = package_name self.package_path = package_path try: self.repo = Repo(self.package_path, search_parent_directories=True) self.git_sha = self.repo.commit().hexsha self.git_url = self.repo.remote("origin").url except InvalidGitRepositoryError: logger.debug("[magenta]Not a git repository")
self.git_sha and self.git_url are not initialised as None.
self.git_sha
self.git_url
None
/cib
Branch bugfix/issue-254-AttributeError-Build-object-has-no-attribute-git_sha created!
Fixed
self.git_sha
andself.git_url
are not initialised asNone
.