Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Less repo timestamp updates #842

Merged
merged 2 commits into from
Oct 31, 2024
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: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ push.self-hosted-rolling:
docker push ${DOCKERHUB_REPO}:rolling_no_dependencies
docker push ${DOCKERHUB_REPO}:rolling

shell:
docker-compose exec worker bash

test_env.up:
env | grep GITHUB > .testenv; true
TIMESERIES_ENABLED=${TIMESERIES_ENABLED} docker-compose up -d
Expand All @@ -213,6 +216,7 @@ test_env.install_cli:
pip install --no-cache-dir codecov-cli==$(CODECOV_CLI_VERSION)

test_env.container_prepare:
apt-get update
apt-get install -y git build-essential netcat-traditional
make test_env.install_cli
git config --global --add safe.directory /worker
Expand Down
20 changes: 15 additions & 5 deletions tasks/sync_repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,21 @@

if repo:
# Found the exact repo. Let's just update
repo.private = repo_data["private"]
repo.language = repo_data["language"]
repo.name = repo_data["name"]
repo.deleted = False
repo.updatestamp = datetime.now()
has_changes = False
if repo.private != repo_data["private"]:
repo.private = repo_data["private"]
has_changes = True

Check warning on line 530 in tasks/sync_repos.py

View check run for this annotation

Codecov Notifications / codecov/patch

tasks/sync_repos.py#L529-L530

Added lines #L529 - L530 were not covered by tests
if repo.language != repo_data["language"]:
repo.language = repo_data["language"]
has_changes = True

Check warning on line 533 in tasks/sync_repos.py

View check run for this annotation

Codecov Notifications / codecov/patch

tasks/sync_repos.py#L532-L533

Added lines #L532 - L533 were not covered by tests
if repo.name != repo_data["name"]:
repo.name = repo_data["name"]
has_changes = True
if repo.deleted is not False:
repo.deleted = False
has_changes = True

Check warning on line 539 in tasks/sync_repos.py

View check run for this annotation

Codecov Notifications / codecov/patch

tasks/sync_repos.py#L538-L539

Added lines #L538 - L539 were not covered by tests
if has_changes:
repo.updatestamp = datetime.now()
repo_id = repo.repoid
return repo_id
# repo was not found, could be a different owner
Expand Down
Loading