Skip to content

Commit

Permalink
Less repo timestamp updates (#842)
Browse files Browse the repository at this point in the history
  • Loading branch information
trent-codecov authored Oct 31, 2024
1 parent 0172ac9 commit 9c70365
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
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 @@ def upsert_repo(

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
if repo.language != repo_data["language"]:
repo.language = repo_data["language"]
has_changes = True
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
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

0 comments on commit 9c70365

Please sign in to comment.