@cesar-richard/git-connector-sdk 1.29.0 → 1.30.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/README.md CHANGED
@@ -140,7 +140,19 @@ for (const e of data.events) {
140
140
 
141
141
  Filters like `?author=cesar` (on `/v1/activities` and `/v1/work-items`) and `?user=cesar` (on `/v1/events`) match the login exactly (case-insensitive). They do NOT fuzzy-match display names. This is a deliberate design choice for auditable activity tracking.
142
142
 
143
- **Known limitation:** GitLab REST commits API doesn't expose the GL user login without a per-commit round-trip. Commits ingested via GL polling have `author: null` + `meta.commitAuthorName` set. Commits ingested via webhook (Push Hook) have `author: <pusher.username>` reliably.
143
+ **GitLab resolver:** commits ingested via polling are resolved server-side by mapping `commit.author_email` → GL user login via the GitLab Users API. The result is cached (default TTL 90 days). If the email cannot be resolved (anonymous commit, email not associated with any GL user, private email on a self-hosted instance), `author` stays `null` and the git-config name lives in `meta.commitAuthorName`. Webhook-ingested GL commits use the pusher's username directly (no resolver needed).
144
+
145
+ **Structured author access via `authorResolved`:** commit events also carry an `authorResolved` blob with `{login, name, email}` (each nullable) — a single typed accessor that aggregates everything we know about the author:
146
+
147
+ ```ts
148
+ for (const e of data.events) {
149
+ if (e.type !== "commit") continue;
150
+ const { login, name, email } = e.authorResolved ?? {};
151
+ console.log(`${login ?? "anonymous"} (${name ?? "?"} <${email ?? "?"}>)`);
152
+ }
153
+ ```
154
+
155
+ Available on every commit event regardless of provider or ingestion path. `event.author` is always equal to `event.authorResolved?.login`.
144
156
 
145
157
  ---
146
158
 
package/dist/schema.d.ts CHANGED
@@ -160,6 +160,11 @@ export interface components {
160
160
  meta: {
161
161
  [key: string]: unknown;
162
162
  } | null;
163
+ authorResolved?: {
164
+ login: string | null;
165
+ name: string | null;
166
+ email: string | null;
167
+ };
163
168
  }[];
164
169
  total: string | number;
165
170
  nextCursor: string | null;
@@ -180,6 +185,11 @@ export interface components {
180
185
  meta: {
181
186
  [key: string]: unknown;
182
187
  } | null;
188
+ authorResolved?: {
189
+ login: string | null;
190
+ name: string | null;
191
+ email: string | null;
192
+ };
183
193
  };
184
194
  IterationWithCount: {
185
195
  id: string | number;
@@ -1286,6 +1296,11 @@ export interface operations {
1286
1296
  meta: {
1287
1297
  [key: string]: unknown;
1288
1298
  } | null;
1299
+ authorResolved?: {
1300
+ login: string | null;
1301
+ name: string | null;
1302
+ email: string | null;
1303
+ };
1289
1304
  }[];
1290
1305
  total: string | number;
1291
1306
  nextCursor: string | null;
@@ -1307,6 +1322,11 @@ export interface operations {
1307
1322
  meta: {
1308
1323
  [key: string]: unknown;
1309
1324
  } | null;
1325
+ authorResolved?: {
1326
+ login: string | null;
1327
+ name: string | null;
1328
+ email: string | null;
1329
+ };
1310
1330
  }[];
1311
1331
  total: string | number;
1312
1332
  nextCursor: string | null;
@@ -1328,6 +1348,11 @@ export interface operations {
1328
1348
  meta: {
1329
1349
  [key: string]: unknown;
1330
1350
  } | null;
1351
+ authorResolved?: {
1352
+ login: string | null;
1353
+ name: string | null;
1354
+ email: string | null;
1355
+ };
1331
1356
  }[];
1332
1357
  total: string | number;
1333
1358
  nextCursor: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cesar-richard/git-connector-sdk",
3
- "version": "1.29.0",
3
+ "version": "1.30.0",
4
4
  "description": "TypeScript SDK for the git-connector v1 API (work items + iterations aggregated from GitHub/GitLab). Version published on npm tracks server releases.",
5
5
  "license": "MIT",
6
6
  "repository": {