Skip to content

Commit

Permalink
refactor: Remove console logging for language usage in job summary
Browse files Browse the repository at this point in the history
  • Loading branch information
austenstone committed Oct 24, 2024
1 parent 382deec commit 802a0ad
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140727,7 +140727,7 @@ const groupBreakdown = (key, data, sort) => {
acc[breakdownItem[key]].acceptances_count += breakdownItem.acceptances_count;
acc[breakdownItem[key]].lines_suggested += breakdownItem.lines_suggested;
acc[breakdownItem[key]].lines_accepted += breakdownItem.lines_accepted;
acc[breakdownItem[key]].active_users = breakdownItem.active_users;
acc[breakdownItem[key]].active_users += breakdownItem.active_users;
}
else {
acc[breakdownItem[key]] = {
Expand Down Expand Up @@ -140790,7 +140790,6 @@ const groupByWeek = (data) => {
};
const createJobSummaryUsage = (data) => {
const languageUsage = groupBreakdown('language', data);
console.log('languageUsage', languageUsage);
const editorUsage = groupBreakdown('editor', data);
const weeklyUsage = groupByWeek(data);
const totalAcceptanceCount = data.reduce((acc, item) => acc + item.total_acceptances_count, 0);
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions dist/job-summary.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/job-summary.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions src/job-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const groupBreakdown = (key: string, data: CopilotUsageResponse, sort?: (a: [str
acc[breakdownItem[key]].acceptances_count += breakdownItem.acceptances_count;
acc[breakdownItem[key]].lines_suggested += breakdownItem.lines_suggested;
acc[breakdownItem[key]].lines_accepted += breakdownItem.lines_accepted;
acc[breakdownItem[key]].active_users = breakdownItem.active_users;
acc[breakdownItem[key]].active_users += breakdownItem.active_users;
} else {
acc[breakdownItem[key]] = {
language: breakdownItem.language.replace(/-/g, '‑'),
Expand Down Expand Up @@ -89,7 +89,6 @@ const groupByWeek = (data: CopilotUsageResponse): CopilotUsageResponse => {

export const createJobSummaryUsage = (data: CopilotUsageResponse) => {
const languageUsage: CustomUsageBreakdown = groupBreakdown('language', data);
console.log('languageUsage', languageUsage);
const editorUsage: CustomUsageBreakdown = groupBreakdown('editor', data);
// const dayOfWeekUsage: CustomUsageBreakdown = groupBreakdown((item) => dateFormat(item.day, { weekday: 'long' }), data, (a, b) => {
// const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
Expand Down

0 comments on commit 802a0ad

Please sign in to comment.