Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit 8fa8e1c

Browse files
Removing commit update for consistency (#949)
1 parent 4db2c66 commit 8fa8e1c

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ push.self-hosted-rolling:
178178
docker push ${DOCKERHUB_REPO}:rolling_no_dependencies
179179
docker push ${DOCKERHUB_REPO}:rolling
180180

181+
shell:
182+
docker-compose exec api bash
183+
181184
test_env.up:
182185
env | grep GITHUB > .testenv; true
183186
TIMESERIES_ENABLED=${TIMESERIES_ENABLED} docker-compose up -d

upload/helpers.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,9 +497,6 @@ def insert_commit(commitid, branch, pr, repository, owner, parent_commit_id=None
497497
)
498498

499499
edited = False
500-
if commit.state != "pending":
501-
commit.state = "pending"
502-
edited = True
503500
if parent_commit_id and commit.parent_commit_id is None:
504501
commit.parent_commit_id = parent_commit_id
505502
edited = True
@@ -508,7 +505,7 @@ def insert_commit(commitid, branch, pr, repository, owner, parent_commit_id=None
508505
commit.branch = branch
509506
edited = True
510507
if edited:
511-
commit.save(update_fields=["parent_commit_id", "state", "branch"])
508+
commit.save(update_fields=["parent_commit_id", "branch"])
512509
return commit
513510

514511

upload/tests/test_upload.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ def test_insert_commit(self):
636636
repository=repo,
637637
parent_commit_id=None,
638638
)
639-
# parent_commit_id, state, and branch should be updated
639+
# parent_commit_id and branch should be updated
640640
insert_commit(
641641
"1c78206f1a46dc6db8412a491fc770eb7d0f8a47",
642642
"oranges",
@@ -650,7 +650,6 @@ def test_insert_commit(self):
650650
commitid="1c78206f1a46dc6db8412a491fc770eb7d0f8a47"
651651
)
652652
assert commit.repository == repo
653-
assert commit.state == "pending"
654653
assert commit.branch == "oranges"
655654
assert commit.pullid == 456
656655
assert commit.merged is None
@@ -671,7 +670,6 @@ def test_insert_commit(self):
671670
commitid="8458a8c72aafb5fb4c5cd58f467a2f71298f1b61"
672671
)
673672
assert commit.repository == repo
674-
assert commit.state == "pending"
675673
assert commit.branch == "test"
676674
assert commit.pullid is None
677675
assert commit.merged is None

0 commit comments

Comments
 (0)