fix(FN-5103): expose own commit shas in attribution helper
Fusion-Task-Id: FN-5103 Fusion-Task-Lineage: e4e4d9ba-4884-4feb-b18b-a30e799c3fb1
This commit is contained in:
committed by
gsxdsm
parent
4420abe6af
commit
3ac14a3605
@@ -19,6 +19,7 @@ describe("FN-5039 branch-attribution", () => {
|
||||
files: [],
|
||||
foreignCommits: [],
|
||||
ownCommitCount: 0,
|
||||
ownCommitShas: [],
|
||||
rawDiffFileCount: 0,
|
||||
commitAttributions: [],
|
||||
});
|
||||
|
||||
@@ -25,6 +25,7 @@ export interface AttributionResult {
|
||||
files: string[];
|
||||
foreignCommits: { sha: string; subject: string; attributedTaskId: string | null }[];
|
||||
ownCommitCount: number;
|
||||
ownCommitShas?: string[];
|
||||
rawDiffFileCount: number;
|
||||
commitAttributions: { sha: string; subject: string; source: AttributionSource; attributed: boolean; attributedTaskId: string | null }[];
|
||||
}
|
||||
@@ -134,7 +135,7 @@ export async function filterFilesToOwnTaskCommits(opts: BranchAttributionOptions
|
||||
);
|
||||
|
||||
if (!logOutput.trim()) {
|
||||
return { files: [], foreignCommits: [], ownCommitCount: 0, rawDiffFileCount, commitAttributions: [] };
|
||||
return { files: [], foreignCommits: [], ownCommitCount: 0, ownCommitShas: [], rawDiffFileCount, commitAttributions: [] };
|
||||
}
|
||||
|
||||
const fileSet = new Set<string>();
|
||||
@@ -188,6 +189,7 @@ export async function filterFilesToOwnTaskCommits(opts: BranchAttributionOptions
|
||||
files: [...fileSet].sort((a, b) => a.localeCompare(b)),
|
||||
foreignCommits,
|
||||
ownCommitCount: ownCommitShas.length,
|
||||
ownCommitShas,
|
||||
rawDiffFileCount,
|
||||
commitAttributions,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user