관리 daemon의 실행 commit SHA를 NPC 감사 결정에 기록
This commit is contained in:
@@ -32,3 +32,9 @@ export interface PendingAuditDecision {
|
||||
|
||||
export const auditDecisionIdentity = (serverId: string, generalId: number, tick: number, revision: number) =>
|
||||
auditPolicyHash([serverId, generalId, tick, revision]);
|
||||
|
||||
// 확정된 전체 SHA만 받는다. branch/tag/축약 SHA나 미상 값을 현재 checkout에서 추정하지 않는다.
|
||||
export const normalizeAuditCodeVersion = (value: string | undefined): string | undefined => {
|
||||
const sha = value?.trim().toLowerCase();
|
||||
return sha && /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/.test(sha) && !/^0+$/.test(sha) ? sha : undefined;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user