Skip to content

Commit

Permalink
tryfix
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Aug 23, 2023
1 parent 0b5836c commit 2dac713
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tagbot/action/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ def _registry_path(self) -> Optional[str]:
@property
def _registry_url(self) -> Optional[str]:
"""Get the package's url in the registry repo."""
if self.__registry_url is not None:
return self.__registry_url
root = self._registry_path
try:
contents = self._only(self._registry.get_contents(f"{root}/Package.toml"))
Expand Down Expand Up @@ -194,6 +196,8 @@ def _registry_pr(self, version: str) -> Optional[PullRequest]:
name = self._project("name")
uuid = self._project("uuid")
url = self._registry_url
if not url:
raise InvalidProject("Could not find url of package in registry")
url_hash = hashlib.sha256(url.encode()).hexdigest()
url_hash_trunc = url_hash[:10]
# This is the format used by Registrator/PkgDev.
Expand Down

0 comments on commit 2dac713

Please sign in to comment.