Skip to content

Commit 06dc5ce

Browse files
committed
refactor: default author to not-specified
1 parent 9c779d2 commit 06dc5ce

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

core/flamingock-core/src/main/java/io/flamingock/internal/core/external/store/audit/domain/AuditContextBundle.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ public static AuditContextBundle.Operation fromOngoingStatusOperation(TargetSyst
4545

4646
}
4747

48+
private final String DEFAULT_AUTHOR = "not-specified";
49+
4850
private final Operation operation;
4951
private final AbstractLoadedChange changeDescriptor;
5052
private final ExecutionContext executionContext;
@@ -95,12 +97,12 @@ public AuditEntry toAuditEntry() {
9597
AbstractLoadedChange loadedChange = getChangeDescriptor();
9698
ExecutionContext stageExecutionContext = getExecutionContext();
9799
RuntimeContext runtimeContext = getRuntimeContext();
98-
100+
String author = loadedChange.getAuthor() != null ? loadedChange.getAuthor() : DEFAULT_AUTHOR;
99101
return new AuditEntry(
100102
stageExecutionContext.getExecutionId(),
101103
runtimeContext.getStageName(),
102104
loadedChange.getId(),
103-
loadedChange.getAuthor(),
105+
author,
104106
runtimeContext.getAppliedAt(),
105107
getAuditStatus(),
106108
getChangeType(),

0 commit comments

Comments
 (0)