File tree Expand file tree Collapse file tree
services/apps/git_integration/src/crowdgit/services/commit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ class CommitService(BaseService):
4949 _GIT_PLATFORM = "git"
5050 _USERNAME_TYPE = "username"
5151 _EMAIL_TYPE = "email"
52- _COMMITTED_COMMIT_SUFFIX = "commited-commit"
5352
5453 MAX_CHUNK_SIZE = 250
5554
@@ -517,8 +516,10 @@ def create_activities_from_commit(
517516
518517 # Only create committer activity if author and committer are different
519518 if author_name != committer_name or author_email != committer_email :
520- # Pre-calculate hash components to avoid repeated string operations
521- hash_input = f"{ commit_hash } { CommitService ._COMMITTED_COMMIT_SUFFIX } { committer_email } "
519+ # IMPORTANT: hash_input has a typo in "commited" instead of "committed"
520+ # however fixing it requires recalculating sourceId/parentSourceId for ALL git activities in db
521+ # so far the typo doesn't have any major effect, since the activity type "committed-commit" is correct
522+ hash_input = f"{ commit_hash } commited-commit{ committer_email } "
522523 committer_source_id = hashlib .sha1 (hash_input .encode ("utf-8" )).hexdigest ()
523524
524525 committer = {
You can’t perform that action at this time.
0 commit comments