Skip to content

Commit 015bfa1

Browse files
committed
types
1 parent 109b3b6 commit 015bfa1

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

lib/workers/repository/update/branch/index.spec.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ import * as _mergeConfidence from '../../../../util/merge-confidence';
3232
import * as _sanitize from '../../../../util/sanitize';
3333
import type { Timestamp } from '../../../../util/timestamp';
3434
import * as _limits from '../../../global/limits';
35-
import type { BranchConfig, BranchUpgradeConfig } from '../../../types';
35+
import type {
36+
BranchConfig,
37+
BranchUpgradeConfig,
38+
CacheFingerprintMatchResult,
39+
} from '../../../types';
3640
import type { ResultWithPr } from '../pr';
3741
import * as _prWorker from '../pr';
3842
import * as _prAutomerge from '../pr/automerge';
@@ -1480,7 +1484,7 @@ describe('workers/repository/update/branch/index', () => {
14801484
branchPrefixOld: 'old/',
14811485
commitFingerprint: '111',
14821486
reuseExistingBranch: true,
1483-
cacheFingerprintMatch: 'matched',
1487+
cacheFingerprintMatch: 'matched' as CacheFingerprintMatchResult,
14841488
};
14851489
expect(await branchWorker.processBranch(inconfig)).toEqual({
14861490
branchExists: true,

lib/workers/types.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ export type BranchResult =
112112
| 'rebase'
113113
| 'update-not-scheduled';
114114

115+
export type CacheFingerprintMatchResult =
116+
| 'matched'
117+
| 'no-match'
118+
| 'no-fingerprint';
119+
115120
export interface BranchConfig
116121
extends BranchUpgradeConfig,
117122
LegacyAdminConfig,
@@ -134,7 +139,7 @@ export interface BranchConfig
134139
stopUpdating?: boolean;
135140
isConflicted?: boolean;
136141
commitFingerprint?: string;
137-
cacheFingerprintMatch?: 'no-fingerprint' | 'no-match' | 'matched';
142+
cacheFingerprintMatch?: CacheFingerprintMatchResult;
138143
}
139144

140145
export interface BranchMetadata {

0 commit comments

Comments
 (0)