Skip to content
Snippets Groups Projects
Unverified Commit bf378a46 authored by RahulGautamSingh's avatar RahulGautamSingh Committed by GitHub
Browse files

feat: add fingerprint to old branches (#17393)

parent 0ca47947
No related branches found
No related tags found
No related merge requests found
...@@ -120,7 +120,13 @@ describe('workers/repository/process/write', () => { ...@@ -120,7 +120,13 @@ describe('workers/repository/process/write', () => {
}, },
]); ]);
repoCache.getCache.mockReturnValueOnce({ repoCache.getCache.mockReturnValueOnce({
branches: [{ branchName: 'new/some-branch' } as BranchCache], branches: [
{
branchName: 'new/some-branch',
sha: '111',
branchFingerprint: '111',
} as BranchCache,
],
}); });
branchWorker.processBranch.mockResolvedValueOnce({ branchWorker.processBranch.mockResolvedValueOnce({
branchExists: true, branchExists: true,
......
...@@ -96,9 +96,10 @@ export async function writeUpdates( ...@@ -96,9 +96,10 @@ export async function writeUpdates(
branch.prBlockedBy = res?.prBlockedBy; branch.prBlockedBy = res?.prBlockedBy;
branch.prNo = res?.prNo; branch.prNo = res?.prNo;
branch.result = res?.result; branch.result = res?.result;
branch.branchFingerprint = res?.commitSha branch.branchFingerprint =
? branchFingerprint res?.commitSha || !branchCache.branchFingerprint
: branchCache.branchFingerprint; ? branchFingerprint
: branchCache.branchFingerprint;
if ( if (
branch.result === BranchResult.Automerged && branch.result === BranchResult.Automerged &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment