diff --git a/ogr/services/github/project.py b/ogr/services/github/project.py index 0b4bdbd2..9e263c28 100644 --- a/ogr/services/github/project.py +++ b/ogr/services/github/project.py @@ -84,6 +84,16 @@ def github_repo(self): self._github_repo = self.github_instance.get_repo( full_name_or_id=f"{self.namespace}/{self.repo}", ) + + # Handle possible 301 + if ( + self._github_repo.owner.login != self.namespace + or self._github_repo.name != self.repo + ): + (self.namespace, self.repo) = ( + self._github_repo.owner.login, + self._github_repo.name, + ) return self._github_repo def __str__(self) -> str: