Skip to content

Commit 0924673

Browse files
fix: owner_team
1 parent 5386c00 commit 0924673

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tools/spectral/ipa/metrics/utils.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,23 @@ export function merge(ownershipData, collectorResults, ruleSeverityMap) {
8787
continue;
8888
}
8989

90+
let ownerTeam = null;
91+
if (entry.componentId.startsWith('paths')) {
92+
const pathParts = entry.componentId.split('.');
93+
if (pathParts.length === 2) {
94+
const path = pathParts[1];
95+
ownerTeam = ownershipData[path];
96+
}
97+
}
98+
9099
results.push({
91100
component_id: entry.componentId,
92101
ipa_rule: entry.ruleName,
93102
ipa: getIPAFromIPARule(entry.ruleName),
94103
severity_level: ruleSeverityMap[entry.ruleName],
95104
adoption_status: adoptionStatus,
96105
exception_reason: entryType === EntryType.EXCEPTION ? entry.exceptionReason : null,
97-
owner_team: entry.ownerTeam || null,
106+
owner_team: ownerTeam,
98107
timestamp: new Date().toISOString(),
99108
});
100109
}

0 commit comments

Comments
 (0)