Skip to content

Commit e85f901

Browse files
committed
use config hash in commit hash
1 parent 3ed7708 commit e85f901

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Service/Action/Committer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function commit(int $actionId, ?string $config, UserContext $context): ?s
5151
return null;
5252
}
5353

54-
$commitHash = sha1($context->getTenantId() . $context->getUserId() . $actionId . $previousCommitHash . $config);
54+
$commitHash = sha1($context->getTenantId() . $context->getUserId() . $actionId . $previousCommitHash . $configHash);
5555

5656
$existing = $this->actionCommitTable->findOneByCommitHash($commitHash);
5757
if ($existing instanceof Table\Generated\ActionCommitRow) {

src/Service/Schema/Committer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function commit(int $schemaId, string $source, UserContext $context): ?st
5151
return null;
5252
}
5353

54-
$commitHash = sha1($context->getTenantId() . $context->getUserId() . $schemaId . $previousCommitHash . $source);
54+
$commitHash = sha1($context->getTenantId() . $context->getUserId() . $schemaId . $previousCommitHash . $sourceHash);
5555

5656
$existing = $this->schemaCommitTable->findOneByCommitHash($commitHash);
5757
if ($existing instanceof Table\Generated\SchemaCommitRow) {

0 commit comments

Comments
 (0)