Skip to content

Commit d135939

Browse files
committed
INFRA-3180-Code review fixes
1 parent fab7d7c commit d135939

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/scripts/generate-rc-commits.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ async function getTeam(repository, prNumber) {
3838
console.error(
3939
`Invalid response when fetching topology.json: ${response.status}`,
4040
);
41-
return ['Unknown'];
41+
return undefined;
4242
}
4343

4444
const topologyJson = response.data;
@@ -55,15 +55,15 @@ async function getTeam(repository, prNumber) {
5555
}
5656
}
5757

58-
// Return 'Unknown' if author not found in any team
59-
return 'Unknown';
58+
// Return undefined if author not found in any team
59+
return undefined;
6060

6161
} catch (error) {
6262
console.error(
6363
`Error fetching team for PR #${prNumber}:`,
6464
error.message || error,
6565
);
66-
return 'Unknown';
66+
return undefined;
6767
}
6868
}
6969

@@ -122,7 +122,7 @@ async function filterCommitsByTeam(platform, refA, refB) {
122122
const prLink = prMatch
123123
? `https://github.com/MetaMask/${repository}/pull/${prMatch[1]}`
124124
: '';
125-
const team = await getTeam(repository, prMatch);
125+
const team = await getTeam(repository, prMatch) || 'none';
126126

127127
// Initialize the team's commits array if it doesn't exist
128128
if (!commitsByTeam[team]) {

0 commit comments

Comments
 (0)