@commandgarden/cli 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +74 -10
- package/node_modules/@commandgarden/app/dist/client/assets/index-Cglxej9D.css +1 -0
- package/node_modules/@commandgarden/app/dist/client/assets/index-Cju0_G1Y.js +397 -0
- package/node_modules/@commandgarden/app/dist/client/index.html +19 -19
- package/node_modules/@commandgarden/app/dist/server/routes/connectors.js +3 -0
- package/node_modules/@commandgarden/app/dist/server/routes/index.js +4 -0
- package/node_modules/@commandgarden/app/dist/server/routes/security-news-cache.d.ts +3 -0
- package/node_modules/@commandgarden/app/dist/server/routes/security-news-cache.js +17 -0
- package/node_modules/@commandgarden/app/dist/server/routes/skills.d.ts +2 -0
- package/node_modules/@commandgarden/app/dist/server/routes/skills.js +65 -0
- package/node_modules/@commandgarden/app/dist/server/store.d.ts +5 -0
- package/node_modules/@commandgarden/app/dist/server/store.js +46 -27
- package/node_modules/@commandgarden/app/package.json +42 -42
- package/node_modules/@commandgarden/chrome/dist/content-script.js.map +1 -1
- package/node_modules/@commandgarden/chrome/dist/manifest.json +16 -16
- package/node_modules/@commandgarden/chrome/dist/popup.html +218 -197
- package/node_modules/@commandgarden/chrome/dist/popup.js.map +1 -1
- package/node_modules/@commandgarden/chrome/dist/service-worker.js.map +1 -1
- package/node_modules/@commandgarden/chrome/package.json +25 -25
- package/node_modules/@commandgarden/daemon/connectors/ado-git-commits.eval.js +143 -143
- package/node_modules/@commandgarden/daemon/connectors/ado-git-commits.yaml +70 -70
- package/node_modules/@commandgarden/daemon/connectors/gcs-kb-content.yaml +58 -58
- package/node_modules/@commandgarden/daemon/connectors/gcs-kb-pages.yaml +47 -47
- package/node_modules/@commandgarden/daemon/connectors/jira-my-tickets.eval.js +115 -115
- package/node_modules/@commandgarden/daemon/connectors/jira-my-tickets.yaml +54 -54
- package/node_modules/@commandgarden/daemon/connectors/lib/msal-token.js +20 -20
- package/node_modules/@commandgarden/daemon/connectors/outlook-my-meetings.eval.js +186 -186
- package/node_modules/@commandgarden/daemon/connectors/outlook-my-meetings.yaml +41 -41
- package/node_modules/@commandgarden/daemon/connectors/saba-pending-training.eval.js +94 -0
- package/node_modules/@commandgarden/daemon/connectors/saba-pending-training.yaml +34 -0
- package/node_modules/@commandgarden/daemon/connectors/socket-security-news.yaml +63 -63
- package/node_modules/@commandgarden/daemon/connectors/teams-room-availability.eval.js +341 -341
- package/node_modules/@commandgarden/daemon/connectors/teams-room-availability.yaml +46 -46
- package/node_modules/@commandgarden/daemon/connectors/timetracking-projects.eval.js +52 -52
- package/node_modules/@commandgarden/daemon/connectors/timetracking-projects.yaml +42 -42
- package/node_modules/@commandgarden/daemon/connectors/timetracking-report.eval.js +81 -81
- package/node_modules/@commandgarden/daemon/connectors/timetracking-report.yaml +52 -52
- package/node_modules/@commandgarden/daemon/connectors/tldrsec-newsletter.eval.js +27 -0
- package/node_modules/@commandgarden/daemon/connectors/tldrsec-newsletter.yaml +38 -0
- package/node_modules/@commandgarden/daemon/connectors/tokenmaster-clients-list.yaml +55 -55
- package/node_modules/@commandgarden/daemon/dist/audit-store.js +8 -8
- package/node_modules/@commandgarden/daemon/package.json +32 -32
- package/node_modules/@commandgarden/shared/package.json +32 -32
- package/package.json +58 -57
- package/node_modules/@commandgarden/app/dist/client/assets/index-CThI0UCl.css +0 -1
- package/node_modules/@commandgarden/app/dist/client/assets/index-WANip_um.js +0 -252
- package/node_modules/@commandgarden/app/dist/server/daemon-client.test.js +0 -47
- package/node_modules/@commandgarden/app/dist/server/routes/routes.test.js +0 -137
- package/node_modules/@commandgarden/app/dist/server/store.test.js +0 -59
- package/node_modules/@commandgarden/chrome/dist/fetch-interceptor.js +0 -44
- package/node_modules/@commandgarden/daemon/dist/cdp-client.d.ts +0 -24
- package/node_modules/@commandgarden/daemon/dist/cdp-client.d.ts.map +0 -1
- package/node_modules/@commandgarden/daemon/dist/cdp-client.js +0 -150
- package/node_modules/@commandgarden/daemon/dist/cdp-client.js.map +0 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@commandgarden/chrome",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"type": "module",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist"
|
|
8
|
-
],
|
|
9
|
-
"scripts": {
|
|
10
|
-
"build": "node build.mjs",
|
|
11
|
-
"test": "vitest run",
|
|
12
|
-
"test:watch": "vitest"
|
|
13
|
-
},
|
|
14
|
-
"dependencies": {
|
|
15
|
-
"@commandgarden/shared": "*"
|
|
16
|
-
},
|
|
17
|
-
"devDependencies": {
|
|
18
|
-
"@types/chrome": "^0.0.287",
|
|
19
|
-
"@types/node": "^22.0.0",
|
|
20
|
-
"esbuild": "^0.25.0",
|
|
21
|
-
"jsdom": "^25.0.0",
|
|
22
|
-
"typescript": "^5.4.0",
|
|
23
|
-
"vitest": "^2.0.0"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@commandgarden/chrome",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "node build.mjs",
|
|
11
|
+
"test": "vitest run",
|
|
12
|
+
"test:watch": "vitest"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@commandgarden/shared": "*"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/chrome": "^0.0.287",
|
|
19
|
+
"@types/node": "^22.0.0",
|
|
20
|
+
"esbuild": "^0.25.0",
|
|
21
|
+
"jsdom": "^25.0.0",
|
|
22
|
+
"typescript": "^5.4.0",
|
|
23
|
+
"vitest": "^2.0.0"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
// Runs in page context via js_evaluate step.
|
|
2
|
-
// Fetches ADO Git commits (via Pushes API, all branches) and completed PRs
|
|
3
|
-
// using the browser's ADO session cookies — no PAT or MSAL token required.
|
|
4
|
-
//
|
|
5
|
-
// Strategy: navigate to dev.azure.com to trigger SSO, then call the ADO REST
|
|
6
|
-
// API with session cookies (credentials:'include'). The Pushes API captures
|
|
7
|
-
// work across ALL branches (unlike the Commits API which only searches the
|
|
8
|
-
// default branch).
|
|
9
|
-
//
|
|
10
|
-
// Template variables interpolated before execution:
|
|
11
|
-
// ${{ args.org }}
|
|
12
|
-
// ${{ args.project }}
|
|
13
|
-
// ${{ args.repo }}
|
|
14
|
-
// ${{ args.fromDate }}
|
|
15
|
-
// ${{ args.toDate }}
|
|
16
|
-
// ${{ args.author | default("") }}
|
|
17
|
-
|
|
18
|
-
function sleep(ms) { return new Promise(r => setTimeout(r, ms)); }
|
|
19
|
-
|
|
20
|
-
// ── Read args ─────────────────────────────────────────────────────────
|
|
21
|
-
const org = '${{ args.org }}'.trim();
|
|
22
|
-
const project = '${{ args.project }}'.trim();
|
|
23
|
-
const repo = '${{ args.repo }}'.trim();
|
|
24
|
-
const fromDate = '${{ args.fromDate }}'.trim();
|
|
25
|
-
const toDate = '${{ args.toDate }}'.trim();
|
|
26
|
-
const authorFilter = '${{ args.author | default("") }}'.trim().toLowerCase();
|
|
27
|
-
|
|
28
|
-
if (!org || !project || !repo || !fromDate || !toDate) {
|
|
29
|
-
throw new Error('Missing required args: org, project, repo, fromDate, toDate');
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// ── Wait for ADO to finish SSO/redirect (up to 30s) ──────────────────
|
|
33
|
-
// ADO uses httpOnly session cookies — no MSAL tokens in sessionStorage.
|
|
34
|
-
// We just need the browser to be logged in; session cookies are sent
|
|
35
|
-
// automatically with same-origin fetch (credentials: 'include').
|
|
36
|
-
const __deadline = Date.now() + 30000;
|
|
37
|
-
while (Date.now() < __deadline) {
|
|
38
|
-
if (location.hostname === 'dev.azure.com') break;
|
|
39
|
-
await sleep(1000);
|
|
40
|
-
}
|
|
41
|
-
if (location.hostname !== 'dev.azure.com') {
|
|
42
|
-
throw new Error('Not signed in to Azure DevOps — log in at dev.azure.com and retry');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// ADO REST API: dev.azure.com/{org}/{project}/_apis/...
|
|
46
|
-
const apiBase = `https://dev.azure.com/${org}/${project}/_apis`;
|
|
47
|
-
// Use session cookies for auth (same-origin, no Bearer token needed)
|
|
48
|
-
const authHeaders = { Accept: 'application/json' };
|
|
49
|
-
|
|
50
|
-
// ── Step 1: List pushes in the date range ─────────────────────────────
|
|
51
|
-
const listUrl =
|
|
52
|
-
`${apiBase}/git/repositories/${repo}/pushes` +
|
|
53
|
-
`?searchCriteria.fromDate=${fromDate}T00:00:00Z` +
|
|
54
|
-
`&searchCriteria.toDate=${toDate}T23:59:59Z` +
|
|
55
|
-
`&api-version=7.1`;
|
|
56
|
-
|
|
57
|
-
const listResp = await fetch(listUrl, { headers: authHeaders, credentials: 'include' });
|
|
58
|
-
if (!listResp.ok) throw new Error(`Pushes list HTTP ${listResp.status}: ${await listResp.text()}`);
|
|
59
|
-
const listBody = await listResp.json();
|
|
60
|
-
let pushes = listBody.value || [];
|
|
61
|
-
|
|
62
|
-
// Filter by author if provided (case-insensitive substring match on
|
|
63
|
-
// pushedBy.uniqueName or pushedBy.displayName)
|
|
64
|
-
if (authorFilter) {
|
|
65
|
-
pushes = pushes.filter(p => {
|
|
66
|
-
const un = (p.pushedBy?.uniqueName || '').toLowerCase();
|
|
67
|
-
const dn = (p.pushedBy?.displayName || '').toLowerCase();
|
|
68
|
-
return un.includes(authorFilter) || dn.includes(authorFilter);
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
// ── Step 2: Fetch each push's commits ─────────────────────────────────
|
|
73
|
-
const seen = new Set();
|
|
74
|
-
const commits = [];
|
|
75
|
-
|
|
76
|
-
for (const push of pushes) {
|
|
77
|
-
const detailUrl = `${apiBase}/git/repositories/${repo}/pushes/${push.pushId}?api-version=7.1`;
|
|
78
|
-
try {
|
|
79
|
-
const detailResp = await fetch(detailUrl, { headers: authHeaders, credentials: 'include' });
|
|
80
|
-
if (!detailResp.ok) continue;
|
|
81
|
-
const detail = await detailResp.json();
|
|
82
|
-
for (const c of (detail.commits || [])) {
|
|
83
|
-
// Deduplicate: same commit can appear in multiple pushes (e.g. after merge)
|
|
84
|
-
if (seen.has(c.commitId)) continue;
|
|
85
|
-
seen.add(c.commitId);
|
|
86
|
-
commits.push(c);
|
|
87
|
-
}
|
|
88
|
-
} catch (_) { /* skip failed push detail fetches */ }
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// ── Step 3: Fetch completed PRs in the date range ─────────────────────
|
|
92
|
-
const prUrl =
|
|
93
|
-
`${apiBase}/git/repositories/${repo}/pullrequests` +
|
|
94
|
-
`?searchCriteria.status=completed` +
|
|
95
|
-
`&api-version=7.1`;
|
|
96
|
-
|
|
97
|
-
let prRows = [];
|
|
98
|
-
try {
|
|
99
|
-
const prResp = await fetch(prUrl, { headers: authHeaders, credentials: 'include' });
|
|
100
|
-
if (prResp.ok) {
|
|
101
|
-
const prBody = await prResp.json();
|
|
102
|
-
const prs = (prBody.value || []).filter(pr => {
|
|
103
|
-
if (!pr.closedDate) return false;
|
|
104
|
-
return pr.closedDate >= `${fromDate}T00:00:00Z` && pr.closedDate <= `${toDate}T23:59:59Z`;
|
|
105
|
-
});
|
|
106
|
-
// Optionally filter PRs by author
|
|
107
|
-
const filtered = authorFilter
|
|
108
|
-
? prs.filter(pr => {
|
|
109
|
-
const un = (pr.createdBy?.uniqueName || '').toLowerCase();
|
|
110
|
-
return un.includes(authorFilter);
|
|
111
|
-
})
|
|
112
|
-
: prs;
|
|
113
|
-
prRows = filtered.map(pr => ({
|
|
114
|
-
commitId: '',
|
|
115
|
-
authorName: pr.createdBy?.displayName || '',
|
|
116
|
-
authorEmail: pr.createdBy?.uniqueName || '',
|
|
117
|
-
date: (pr.closedDate || '').slice(0, 10),
|
|
118
|
-
message: `PR #${pr.pullRequestId}: ${pr.title || '(no title)'}`,
|
|
119
|
-
filesAdded: 0,
|
|
120
|
-
filesEdited: 0,
|
|
121
|
-
filesDeleted: 0,
|
|
122
|
-
isPR: 'true',
|
|
123
|
-
prId: pr.pullRequestId,
|
|
124
|
-
}));
|
|
125
|
-
}
|
|
126
|
-
} catch (_) { /* PRs are supplemental — don't fail on error */ }
|
|
127
|
-
|
|
128
|
-
// ── Build output rows ─────────────────────────────────────────────────
|
|
129
|
-
const commitRows = commits.map(c => ({
|
|
130
|
-
commitId: c.commitId || '',
|
|
131
|
-
authorName: c.author?.name || '',
|
|
132
|
-
authorEmail: c.author?.email || '',
|
|
133
|
-
date: (c.author?.date || '').slice(0, 10),
|
|
134
|
-
message: (c.comment || '').split('\n')[0].slice(0, 200),
|
|
135
|
-
filesAdded: c.changeCounts?.Add || 0,
|
|
136
|
-
filesEdited: c.changeCounts?.Edit || 0,
|
|
137
|
-
filesDeleted: c.changeCounts?.Delete || 0,
|
|
138
|
-
isPR: 'false',
|
|
139
|
-
prId: 0,
|
|
140
|
-
}));
|
|
141
|
-
|
|
142
|
-
const rows = [...commitRows, ...prRows];
|
|
143
|
-
return rows;
|
|
1
|
+
// Runs in page context via js_evaluate step.
|
|
2
|
+
// Fetches ADO Git commits (via Pushes API, all branches) and completed PRs
|
|
3
|
+
// using the browser's ADO session cookies — no PAT or MSAL token required.
|
|
4
|
+
//
|
|
5
|
+
// Strategy: navigate to dev.azure.com to trigger SSO, then call the ADO REST
|
|
6
|
+
// API with session cookies (credentials:'include'). The Pushes API captures
|
|
7
|
+
// work across ALL branches (unlike the Commits API which only searches the
|
|
8
|
+
// default branch).
|
|
9
|
+
//
|
|
10
|
+
// Template variables interpolated before execution:
|
|
11
|
+
// ${{ args.org }}
|
|
12
|
+
// ${{ args.project }}
|
|
13
|
+
// ${{ args.repo }}
|
|
14
|
+
// ${{ args.fromDate }}
|
|
15
|
+
// ${{ args.toDate }}
|
|
16
|
+
// ${{ args.author | default("") }}
|
|
17
|
+
|
|
18
|
+
function sleep(ms) { return new Promise(r => setTimeout(r, ms)); }
|
|
19
|
+
|
|
20
|
+
// ── Read args ─────────────────────────────────────────────────────────
|
|
21
|
+
const org = '${{ args.org }}'.trim();
|
|
22
|
+
const project = '${{ args.project }}'.trim();
|
|
23
|
+
const repo = '${{ args.repo }}'.trim();
|
|
24
|
+
const fromDate = '${{ args.fromDate }}'.trim();
|
|
25
|
+
const toDate = '${{ args.toDate }}'.trim();
|
|
26
|
+
const authorFilter = '${{ args.author | default("") }}'.trim().toLowerCase();
|
|
27
|
+
|
|
28
|
+
if (!org || !project || !repo || !fromDate || !toDate) {
|
|
29
|
+
throw new Error('Missing required args: org, project, repo, fromDate, toDate');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// ── Wait for ADO to finish SSO/redirect (up to 30s) ──────────────────
|
|
33
|
+
// ADO uses httpOnly session cookies — no MSAL tokens in sessionStorage.
|
|
34
|
+
// We just need the browser to be logged in; session cookies are sent
|
|
35
|
+
// automatically with same-origin fetch (credentials: 'include').
|
|
36
|
+
const __deadline = Date.now() + 30000;
|
|
37
|
+
while (Date.now() < __deadline) {
|
|
38
|
+
if (location.hostname === 'dev.azure.com') break;
|
|
39
|
+
await sleep(1000);
|
|
40
|
+
}
|
|
41
|
+
if (location.hostname !== 'dev.azure.com') {
|
|
42
|
+
throw new Error('Not signed in to Azure DevOps — log in at dev.azure.com and retry');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// ADO REST API: dev.azure.com/{org}/{project}/_apis/...
|
|
46
|
+
const apiBase = `https://dev.azure.com/${org}/${project}/_apis`;
|
|
47
|
+
// Use session cookies for auth (same-origin, no Bearer token needed)
|
|
48
|
+
const authHeaders = { Accept: 'application/json' };
|
|
49
|
+
|
|
50
|
+
// ── Step 1: List pushes in the date range ─────────────────────────────
|
|
51
|
+
const listUrl =
|
|
52
|
+
`${apiBase}/git/repositories/${repo}/pushes` +
|
|
53
|
+
`?searchCriteria.fromDate=${fromDate}T00:00:00Z` +
|
|
54
|
+
`&searchCriteria.toDate=${toDate}T23:59:59Z` +
|
|
55
|
+
`&api-version=7.1`;
|
|
56
|
+
|
|
57
|
+
const listResp = await fetch(listUrl, { headers: authHeaders, credentials: 'include' });
|
|
58
|
+
if (!listResp.ok) throw new Error(`Pushes list HTTP ${listResp.status}: ${await listResp.text()}`);
|
|
59
|
+
const listBody = await listResp.json();
|
|
60
|
+
let pushes = listBody.value || [];
|
|
61
|
+
|
|
62
|
+
// Filter by author if provided (case-insensitive substring match on
|
|
63
|
+
// pushedBy.uniqueName or pushedBy.displayName)
|
|
64
|
+
if (authorFilter) {
|
|
65
|
+
pushes = pushes.filter(p => {
|
|
66
|
+
const un = (p.pushedBy?.uniqueName || '').toLowerCase();
|
|
67
|
+
const dn = (p.pushedBy?.displayName || '').toLowerCase();
|
|
68
|
+
return un.includes(authorFilter) || dn.includes(authorFilter);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// ── Step 2: Fetch each push's commits ─────────────────────────────────
|
|
73
|
+
const seen = new Set();
|
|
74
|
+
const commits = [];
|
|
75
|
+
|
|
76
|
+
for (const push of pushes) {
|
|
77
|
+
const detailUrl = `${apiBase}/git/repositories/${repo}/pushes/${push.pushId}?api-version=7.1`;
|
|
78
|
+
try {
|
|
79
|
+
const detailResp = await fetch(detailUrl, { headers: authHeaders, credentials: 'include' });
|
|
80
|
+
if (!detailResp.ok) continue;
|
|
81
|
+
const detail = await detailResp.json();
|
|
82
|
+
for (const c of (detail.commits || [])) {
|
|
83
|
+
// Deduplicate: same commit can appear in multiple pushes (e.g. after merge)
|
|
84
|
+
if (seen.has(c.commitId)) continue;
|
|
85
|
+
seen.add(c.commitId);
|
|
86
|
+
commits.push(c);
|
|
87
|
+
}
|
|
88
|
+
} catch (_) { /* skip failed push detail fetches */ }
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// ── Step 3: Fetch completed PRs in the date range ─────────────────────
|
|
92
|
+
const prUrl =
|
|
93
|
+
`${apiBase}/git/repositories/${repo}/pullrequests` +
|
|
94
|
+
`?searchCriteria.status=completed` +
|
|
95
|
+
`&api-version=7.1`;
|
|
96
|
+
|
|
97
|
+
let prRows = [];
|
|
98
|
+
try {
|
|
99
|
+
const prResp = await fetch(prUrl, { headers: authHeaders, credentials: 'include' });
|
|
100
|
+
if (prResp.ok) {
|
|
101
|
+
const prBody = await prResp.json();
|
|
102
|
+
const prs = (prBody.value || []).filter(pr => {
|
|
103
|
+
if (!pr.closedDate) return false;
|
|
104
|
+
return pr.closedDate >= `${fromDate}T00:00:00Z` && pr.closedDate <= `${toDate}T23:59:59Z`;
|
|
105
|
+
});
|
|
106
|
+
// Optionally filter PRs by author
|
|
107
|
+
const filtered = authorFilter
|
|
108
|
+
? prs.filter(pr => {
|
|
109
|
+
const un = (pr.createdBy?.uniqueName || '').toLowerCase();
|
|
110
|
+
return un.includes(authorFilter);
|
|
111
|
+
})
|
|
112
|
+
: prs;
|
|
113
|
+
prRows = filtered.map(pr => ({
|
|
114
|
+
commitId: '',
|
|
115
|
+
authorName: pr.createdBy?.displayName || '',
|
|
116
|
+
authorEmail: pr.createdBy?.uniqueName || '',
|
|
117
|
+
date: (pr.closedDate || '').slice(0, 10),
|
|
118
|
+
message: `PR #${pr.pullRequestId}: ${pr.title || '(no title)'}`,
|
|
119
|
+
filesAdded: 0,
|
|
120
|
+
filesEdited: 0,
|
|
121
|
+
filesDeleted: 0,
|
|
122
|
+
isPR: 'true',
|
|
123
|
+
prId: pr.pullRequestId,
|
|
124
|
+
}));
|
|
125
|
+
}
|
|
126
|
+
} catch (_) { /* PRs are supplemental — don't fail on error */ }
|
|
127
|
+
|
|
128
|
+
// ── Build output rows ─────────────────────────────────────────────────
|
|
129
|
+
const commitRows = commits.map(c => ({
|
|
130
|
+
commitId: c.commitId || '',
|
|
131
|
+
authorName: c.author?.name || '',
|
|
132
|
+
authorEmail: c.author?.email || '',
|
|
133
|
+
date: (c.author?.date || '').slice(0, 10),
|
|
134
|
+
message: (c.comment || '').split('\n')[0].slice(0, 200),
|
|
135
|
+
filesAdded: c.changeCounts?.Add || 0,
|
|
136
|
+
filesEdited: c.changeCounts?.Edit || 0,
|
|
137
|
+
filesDeleted: c.changeCounts?.Delete || 0,
|
|
138
|
+
isPR: 'false',
|
|
139
|
+
prId: 0,
|
|
140
|
+
}));
|
|
141
|
+
|
|
142
|
+
const rows = [...commitRows, ...prRows];
|
|
143
|
+
return rows;
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
site: ado
|
|
2
|
-
name: git-commits
|
|
3
|
-
version: "1.0"
|
|
4
|
-
description: "Azure DevOps Git commits and PRs across all branches for a date range"
|
|
5
|
-
access: read
|
|
6
|
-
|
|
7
|
-
domains:
|
|
8
|
-
- "dev.azure.com"
|
|
9
|
-
capabilities:
|
|
10
|
-
- navigate
|
|
11
|
-
- js_evaluate
|
|
12
|
-
|
|
13
|
-
args:
|
|
14
|
-
- name: org
|
|
15
|
-
type: string
|
|
16
|
-
required: true
|
|
17
|
-
help: "ADO organization name (e.g. 'daimler-mic')"
|
|
18
|
-
- name: project
|
|
19
|
-
type: string
|
|
20
|
-
required: true
|
|
21
|
-
help: "ADO project name (e.g. 'mic-dns')"
|
|
22
|
-
- name: repo
|
|
23
|
-
type: string
|
|
24
|
-
required: true
|
|
25
|
-
help: "Repository name (e.g. 'mic-dns-api')"
|
|
26
|
-
- name: fromDate
|
|
27
|
-
type: string
|
|
28
|
-
required: true
|
|
29
|
-
help: "Start date in YYYY-MM-DD format"
|
|
30
|
-
pattern: "^\\d{4}-\\d{2}-\\d{2}$"
|
|
31
|
-
- name: toDate
|
|
32
|
-
type: string
|
|
33
|
-
required: true
|
|
34
|
-
help: "End date in YYYY-MM-DD format"
|
|
35
|
-
pattern: "^\\d{4}-\\d{2}-\\d{2}$"
|
|
36
|
-
- name: author
|
|
37
|
-
type: string
|
|
38
|
-
required: false
|
|
39
|
-
help: "Filter by pusher name or email (case-insensitive substring match)"
|
|
40
|
-
|
|
41
|
-
columns:
|
|
42
|
-
- name: commitId
|
|
43
|
-
type: string
|
|
44
|
-
- name: authorName
|
|
45
|
-
type: string
|
|
46
|
-
- name: authorEmail
|
|
47
|
-
type: string
|
|
48
|
-
- name: date
|
|
49
|
-
type: string
|
|
50
|
-
- name: message
|
|
51
|
-
type: string
|
|
52
|
-
- name: filesAdded
|
|
53
|
-
type: number
|
|
54
|
-
- name: filesEdited
|
|
55
|
-
type: number
|
|
56
|
-
- name: filesDeleted
|
|
57
|
-
type: number
|
|
58
|
-
- name: isPR
|
|
59
|
-
type: string
|
|
60
|
-
- name: prId
|
|
61
|
-
type: number
|
|
62
|
-
|
|
63
|
-
pipeline:
|
|
64
|
-
- step: navigate
|
|
65
|
-
url: "https://dev.azure.com/${{ args.org }}"
|
|
66
|
-
- step: wait
|
|
67
|
-
selector: "body"
|
|
68
|
-
timeout: 30000
|
|
69
|
-
- step: js_evaluate
|
|
70
|
-
file: ado-git-commits.eval.js
|
|
1
|
+
site: ado
|
|
2
|
+
name: git-commits
|
|
3
|
+
version: "1.0"
|
|
4
|
+
description: "Azure DevOps Git commits and PRs across all branches for a date range"
|
|
5
|
+
access: read
|
|
6
|
+
|
|
7
|
+
domains:
|
|
8
|
+
- "dev.azure.com"
|
|
9
|
+
capabilities:
|
|
10
|
+
- navigate
|
|
11
|
+
- js_evaluate
|
|
12
|
+
|
|
13
|
+
args:
|
|
14
|
+
- name: org
|
|
15
|
+
type: string
|
|
16
|
+
required: true
|
|
17
|
+
help: "ADO organization name (e.g. 'daimler-mic')"
|
|
18
|
+
- name: project
|
|
19
|
+
type: string
|
|
20
|
+
required: true
|
|
21
|
+
help: "ADO project name (e.g. 'mic-dns')"
|
|
22
|
+
- name: repo
|
|
23
|
+
type: string
|
|
24
|
+
required: true
|
|
25
|
+
help: "Repository name (e.g. 'mic-dns-api')"
|
|
26
|
+
- name: fromDate
|
|
27
|
+
type: string
|
|
28
|
+
required: true
|
|
29
|
+
help: "Start date in YYYY-MM-DD format"
|
|
30
|
+
pattern: "^\\d{4}-\\d{2}-\\d{2}$"
|
|
31
|
+
- name: toDate
|
|
32
|
+
type: string
|
|
33
|
+
required: true
|
|
34
|
+
help: "End date in YYYY-MM-DD format"
|
|
35
|
+
pattern: "^\\d{4}-\\d{2}-\\d{2}$"
|
|
36
|
+
- name: author
|
|
37
|
+
type: string
|
|
38
|
+
required: false
|
|
39
|
+
help: "Filter by pusher name or email (case-insensitive substring match)"
|
|
40
|
+
|
|
41
|
+
columns:
|
|
42
|
+
- name: commitId
|
|
43
|
+
type: string
|
|
44
|
+
- name: authorName
|
|
45
|
+
type: string
|
|
46
|
+
- name: authorEmail
|
|
47
|
+
type: string
|
|
48
|
+
- name: date
|
|
49
|
+
type: string
|
|
50
|
+
- name: message
|
|
51
|
+
type: string
|
|
52
|
+
- name: filesAdded
|
|
53
|
+
type: number
|
|
54
|
+
- name: filesEdited
|
|
55
|
+
type: number
|
|
56
|
+
- name: filesDeleted
|
|
57
|
+
type: number
|
|
58
|
+
- name: isPR
|
|
59
|
+
type: string
|
|
60
|
+
- name: prId
|
|
61
|
+
type: number
|
|
62
|
+
|
|
63
|
+
pipeline:
|
|
64
|
+
- step: navigate
|
|
65
|
+
url: "https://dev.azure.com/${{ args.org }}"
|
|
66
|
+
- step: wait
|
|
67
|
+
selector: "body"
|
|
68
|
+
timeout: 30000
|
|
69
|
+
- step: js_evaluate
|
|
70
|
+
file: ado-git-commits.eval.js
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
site: gcs
|
|
2
|
-
name: kb-content
|
|
3
|
-
version: "2.0"
|
|
4
|
-
description: "Retrieve a single GCS Knowledge Base page as Markdown"
|
|
5
|
-
access: read
|
|
6
|
-
|
|
7
|
-
domains:
|
|
8
|
-
- "pages.i.mercedes-benz.com"
|
|
9
|
-
capabilities:
|
|
10
|
-
- navigate
|
|
11
|
-
- dom_read
|
|
12
|
-
|
|
13
|
-
args:
|
|
14
|
-
- name: path
|
|
15
|
-
type: string
|
|
16
|
-
required: true
|
|
17
|
-
help: "Page path from the kb-pages index, e.g. /gcs/KB/docs/general-security/edr/"
|
|
18
|
-
pattern: "^/gcs/KB/[a-zA-Z0-9_./-]+$"
|
|
19
|
-
|
|
20
|
-
columns:
|
|
21
|
-
- name: title
|
|
22
|
-
type: string
|
|
23
|
-
- name: path
|
|
24
|
-
type: string
|
|
25
|
-
- name: author
|
|
26
|
-
type: string
|
|
27
|
-
- name: lastUpdated
|
|
28
|
-
type: string
|
|
29
|
-
- name: content
|
|
30
|
-
type: string
|
|
31
|
-
|
|
32
|
-
pipeline:
|
|
33
|
-
- step: navigate
|
|
34
|
-
url: "https://pages.i.mercedes-benz.com${{ args.path }}"
|
|
35
|
-
- step: wait
|
|
36
|
-
selector: "article"
|
|
37
|
-
timeout: 30000
|
|
38
|
-
- step: extract
|
|
39
|
-
selector: "article"
|
|
40
|
-
fields:
|
|
41
|
-
title: "h1"
|
|
42
|
-
authorPill: "span.inline-flex"
|
|
43
|
-
- step: extract_html
|
|
44
|
-
selector: "article"
|
|
45
|
-
as: rawHtml
|
|
46
|
-
- step: transform
|
|
47
|
-
type: html_to_markdown
|
|
48
|
-
input: rawHtml
|
|
49
|
-
as: content
|
|
50
|
-
- step: transform
|
|
51
|
-
type: split_metadata
|
|
52
|
-
input: authorPill
|
|
53
|
-
as: meta
|
|
54
|
-
options:
|
|
55
|
-
delimiter: "|"
|
|
56
|
-
fields:
|
|
57
|
-
- author
|
|
58
|
-
- lastUpdated
|
|
1
|
+
site: gcs
|
|
2
|
+
name: kb-content
|
|
3
|
+
version: "2.0"
|
|
4
|
+
description: "Retrieve a single GCS Knowledge Base page as Markdown"
|
|
5
|
+
access: read
|
|
6
|
+
|
|
7
|
+
domains:
|
|
8
|
+
- "pages.i.mercedes-benz.com"
|
|
9
|
+
capabilities:
|
|
10
|
+
- navigate
|
|
11
|
+
- dom_read
|
|
12
|
+
|
|
13
|
+
args:
|
|
14
|
+
- name: path
|
|
15
|
+
type: string
|
|
16
|
+
required: true
|
|
17
|
+
help: "Page path from the kb-pages index, e.g. /gcs/KB/docs/general-security/edr/"
|
|
18
|
+
pattern: "^/gcs/KB/[a-zA-Z0-9_./-]+$"
|
|
19
|
+
|
|
20
|
+
columns:
|
|
21
|
+
- name: title
|
|
22
|
+
type: string
|
|
23
|
+
- name: path
|
|
24
|
+
type: string
|
|
25
|
+
- name: author
|
|
26
|
+
type: string
|
|
27
|
+
- name: lastUpdated
|
|
28
|
+
type: string
|
|
29
|
+
- name: content
|
|
30
|
+
type: string
|
|
31
|
+
|
|
32
|
+
pipeline:
|
|
33
|
+
- step: navigate
|
|
34
|
+
url: "https://pages.i.mercedes-benz.com${{ args.path }}"
|
|
35
|
+
- step: wait
|
|
36
|
+
selector: "article"
|
|
37
|
+
timeout: 30000
|
|
38
|
+
- step: extract
|
|
39
|
+
selector: "article"
|
|
40
|
+
fields:
|
|
41
|
+
title: "h1"
|
|
42
|
+
authorPill: "span.inline-flex"
|
|
43
|
+
- step: extract_html
|
|
44
|
+
selector: "article"
|
|
45
|
+
as: rawHtml
|
|
46
|
+
- step: transform
|
|
47
|
+
type: html_to_markdown
|
|
48
|
+
input: rawHtml
|
|
49
|
+
as: content
|
|
50
|
+
- step: transform
|
|
51
|
+
type: split_metadata
|
|
52
|
+
input: authorPill
|
|
53
|
+
as: meta
|
|
54
|
+
options:
|
|
55
|
+
delimiter: "|"
|
|
56
|
+
fields:
|
|
57
|
+
- author
|
|
58
|
+
- lastUpdated
|