Skip to content

Commit 11899b6

Browse files
Copilotaustenstone
andcommitted
Address code review feedback: Add semicolon and remove type assertion
Co-authored-by: austenstone <[email protected]>
1 parent 063ab8a commit 11899b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/components/usage/actions/charts/chart-pie-user/chart-pie-user.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class ChartPieUserComponent implements OnChanges {
5252
this.data = this.data.filter((line) => line.unitType === 'minutes');
5353

5454
const aggregatedData = this.data.reduce((acc, line) => {
55-
const fieldValue = (line as any)[groupByField] || 'Unknown';
55+
const fieldValue = groupByField === 'username' ? (line.username || 'Unknown') : (line.repositoryName || 'Unknown');
5656
const index = acc.findIndex((item) => item[0] === fieldValue);
5757
if (index === -1) {
5858
acc.push([fieldValue, line.value]);

src/app/usage-report.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export class UsageReportService {
258258
valueType: BehaviorSubject<'minutes' | 'cost'> = new BehaviorSubject<'minutes' | 'cost'>('cost');
259259
formatType: BehaviorSubject<'legacy' | 'summarized' | null> = new BehaviorSubject<'legacy' | 'summarized' | null>(null);
260260
hasWorkflowData: boolean = false;
261-
hasUsernameData: boolean = false
261+
hasUsernameData: boolean = false;
262262
skuMapping: { [key: string]: string } = {
263263
"actions_linux": 'Ubuntu 2',
264264
"actions_linux_16_core": 'Ubuntu 16',

0 commit comments

Comments
 (0)