2022-08-22 07:50:55 +00:00
|
|
|
import hasha from 'hasha';
|
|
|
|
|
|
|
|
export function repoFingerprint(
|
|
|
|
repoId: number | string,
|
|
|
|
endpoint: string | undefined
|
|
|
|
): string {
|
|
|
|
const input = endpoint ? `${endpoint}::${repoId}` : `${repoId}`;
|
|
|
|
const fingerprint = hasha(input);
|
|
|
|
return fingerprint;
|
|
|
|
}
|