Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions upload/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,9 +754,9 @@ def dispatch_upload_task(

def validate_activated_repo(repository):
if repository.active and not repository.activated:
settings_url = f"{settings.CODECOV_DASHBOARD_URL}/{repository.author.service}/{repository.author.username}/{repository.name}/settings"
config_url = f"{settings.CODECOV_DASHBOARD_URL}/{repository.author.service}/{repository.author.username}/{repository.name}/config/general"
raise ValidationError(
f"This repository is deactivated. To resume uploading to it, please activate the repository in the codecov UI: {settings_url}"
f"This repository is deactivated. To resume uploading to it, please activate the repository in the codecov UI: {config_url}"
)


Expand Down
4 changes: 2 additions & 2 deletions upload/tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,12 @@ def test_validate_upload_too_many_uploads_for_commit(

def test_deactivated_repo(db, mocker):
repository = RepositoryFactory.create(active=True, activated=False)
settings_url = f"{settings.CODECOV_DASHBOARD_URL}/{repository.author.service}/{repository.author.username}/{repository.name}/settings"
config_url = f"{settings.CODECOV_DASHBOARD_URL}/{repository.author.service}/{repository.author.username}/{repository.name}/config/general"

with pytest.raises(ValidationError) as exp:
validate_activated_repo(repository)
assert exp.match(
f"This repository is deactivated. To resume uploading to it, please activate the repository in the codecov UI: {settings_url}"
f"This repository is deactivated. To resume uploading to it, please activate the repository in the codecov UI: {config_url}"
)


Expand Down
2 changes: 1 addition & 1 deletion upload/tests/views/test_commits.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_deactivated_repo(db):
response_json = response.json()
assert response.status_code == 400
assert response_json == [
f"This repository is deactivated. To resume uploading to it, please activate the repository in the codecov UI: {settings.CODECOV_DASHBOARD_URL}/github/codecov/the_repo/settings"
f"This repository is deactivated. To resume uploading to it, please activate the repository in the codecov UI: {settings.CODECOV_DASHBOARD_URL}/github/codecov/the_repo/config/general"
]


Expand Down
2 changes: 1 addition & 1 deletion upload/tests/views/test_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_deactivated_repo(db):
response_json = response.json()
assert response.status_code == 400
assert response_json == [
f"This repository is deactivated. To resume uploading to it, please activate the repository in the codecov UI: {settings.CODECOV_DASHBOARD_URL}/github/codecov/the_repo/settings"
f"This repository is deactivated. To resume uploading to it, please activate the repository in the codecov UI: {settings.CODECOV_DASHBOARD_URL}/github/codecov/the_repo/config/general"
]


Expand Down
2 changes: 1 addition & 1 deletion upload/tests/views/test_uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ def test_deactivated_repo(db, mocker, mock_redis):
response_json = response.json()
assert response.status_code == 400
assert response_json == [
f"This repository is deactivated. To resume uploading to it, please activate the repository in the codecov UI: {settings.CODECOV_DASHBOARD_URL}/github/codecov/the_repo/settings"
f"This repository is deactivated. To resume uploading to it, please activate the repository in the codecov UI: {settings.CODECOV_DASHBOARD_URL}/github/codecov/the_repo/config/general"
]


Expand Down
Loading