Skip to content

Commit f734d15

Browse files
committed
fix: Remove console log from run function and add sample JSON data for testing
1 parent 57fdf62 commit f734d15

File tree

2 files changed

+133
-1
lines changed

2 files changed

+133
-1
lines changed

__tests__/mock/sample.json

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
[
2+
{
3+
"date": "2025-03-01",
4+
"copilot_ide_chat": {
5+
"editors": [
6+
{
7+
"name": "vscode",
8+
"models": [
9+
{
10+
"name": "default",
11+
"total_chats": 1086,
12+
"is_custom_model": false,
13+
"total_engaged_users": 42,
14+
"total_chat_copy_events": 90,
15+
"total_chat_insertion_events": 12
16+
}
17+
],
18+
"total_engaged_users": 42
19+
},
20+
{
21+
"name": "JetBrains",
22+
"models": [
23+
{
24+
"name": "default",
25+
"total_chats": 7,
26+
"is_custom_model": false,
27+
"total_engaged_users": 2,
28+
"total_chat_copy_events": 0,
29+
"total_chat_insertion_events": 0
30+
}
31+
],
32+
"total_engaged_users": 2
33+
},
34+
{
35+
"name": "Xcode",
36+
"models": [
37+
{
38+
"name": "default",
39+
"total_engaged_users": 16
40+
},
41+
{
42+
"name": "git-commit",
43+
"total_engaged_users": 2
44+
},
45+
{
46+
"name": "csharp",
47+
"total_engaged_users": 6
48+
},
49+
{
50+
"name": "json",
51+
"total_engaged_users": 12
52+
},
53+
{
54+
"name": "ql",
55+
"total_engaged_users": 2
56+
},
57+
{
58+
"name": "java",
59+
"total_engaged_users": 8
60+
},
61+
{
62+
"name": "rust",
63+
"total_engaged_users": 1
64+
},
65+
{
66+
"name": "ini",
67+
"total_engaged_users": 3
68+
},
69+
{
70+
"name": "css",
71+
"total_engaged_users": 8
72+
},
73+
{
74+
"name": "razor",
75+
"total_engaged_users": 0
76+
},
77+
{
78+
"name": "dotenv",
79+
"total_engaged_users": 2
80+
},
81+
{
82+
"name": "terraform",
83+
"total_engaged_users": 1
84+
},
85+
{
86+
"name": "ignore",
87+
"total_engaged_users": 1
88+
},
89+
{
90+
"name": "vue",
91+
"total_engaged_users": 1
92+
},
93+
{
94+
"name": "cpp",
95+
"total_engaged_users": 3
96+
},
97+
{
98+
"name": "scss",
99+
"total_engaged_users": 3
100+
},
101+
{
102+
"name": "xml",
103+
"total_engaged_users": 1
104+
},
105+
{
106+
"name": "dockerfile",
107+
"total_engaged_users": 0
108+
},
109+
{
110+
"name": "mermaid.flowchart",
111+
"total_engaged_users": 0
112+
},
113+
{
114+
"name": "oracle-sql",
115+
"total_engaged_users": 0
116+
},
117+
{
118+
"name": "plaintext",
119+
"total_engaged_users": 1
120+
},
121+
{
122+
"name": "tex",
123+
"total_engaged_users": 0
124+
},
125+
{
126+
"name": "objective-cpp",
127+
"total_engaged_users": 0
128+
}
129+
],
130+
"total_engaged_users": 119
131+
}
132+
}
133+
]

src/run.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ const run = async (): Promise<void> => {
120120
return warn("No Copilot usage data found");
121121
}
122122
debug(JSON.stringify(data, null, 2));
123-
console.log(JSON.stringify(data, null, 2));
124123
info(`Fetched Copilot usage data for ${data.length} days (${data[0].date} to ${data[data.length - 1].date})`);
125124

126125
if (input.jobSummary) {

0 commit comments

Comments
 (0)