Skip to content

Commit

Permalink
fix: Use html_url instead of homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Pepe committed Dec 14, 2023
1 parent f41290e commit 9de4825
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/voraus_template_updater/_update_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _check_and_update_projects( # pylint: disable=dangerous-default-value # Onl
if repo.archived:
_logger.info(f"Skipped '{repo.name}'. Project archived.")
summary.skipped_projects.append(
SkippedProject(name=repo.name, url=repo.homepage, reason="Project archived")
SkippedProject(name=repo.name, url=repo.html_url, reason="Project archived")
)
continue

Expand All @@ -76,15 +76,15 @@ def _check_and_update_projects( # pylint: disable=dangerous-default-value # Onl
except GithubException:
_logger.info(f"Skipped '{repo.name}'. Project does not have a '.cruft.json' file.")
summary.skipped_projects.append(
SkippedProject(name=repo.name, url=repo.homepage, reason="No '.cruft.json' file")
SkippedProject(name=repo.name, url=repo.html_url, reason="No '.cruft.json' file")
)
continue
except HTTPError:
_logger.warning(
f"Skipped '{repo.name}'. Failed to retrieve '.cruft.json' file although the project has one."
)
summary.skipped_projects.append(
SkippedProject(name=repo.name, url=repo.homepage, reason="Cannot download '.cruft.json' file")
SkippedProject(name=repo.name, url=repo.html_url, reason="Cannot download '.cruft.json' file")
)
continue

Expand All @@ -94,7 +94,7 @@ def _check_and_update_projects( # pylint: disable=dangerous-default-value # Onl

project = Project(
name=repo.name,
url=repo.homepage,
url=repo.html_url,
maintainer=maintainer,
default_branch=repo.default_branch,
template_url=template_url,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_update_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _set_up_mocks(
def _repo_mock_fixture() -> Generator[MagicMock, None, None]:
repo_mock = MagicMock()
repo_mock.name = "repo"
repo_mock.homepage = "https://some-repo.com"
repo_mock.html_url = "https://some-repo.com"
repo_mock.default_branch = "default-branch"
repo_mock.archived = False

Expand Down

0 comments on commit 9de4825

Please sign in to comment.