airbyte-faros-destination 0.19.29 → 0.19.31
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/lib/converters/gitlab/faros_epics.d.ts +8 -0
- package/lib/converters/gitlab/faros_epics.js +44 -0
- package/lib/converters/gitlab/faros_epics.js.map +1 -0
- package/lib/converters/gitlab/faros_issues.d.ts +3 -0
- package/lib/converters/gitlab/faros_issues.js +128 -2
- package/lib/converters/gitlab/faros_issues.js.map +1 -1
- package/lib/converters/gitlab/faros_iterations.d.ts +9 -0
- package/lib/converters/gitlab/faros_iterations.js +60 -0
- package/lib/converters/gitlab/faros_iterations.js.map +1 -0
- package/lib/converters/gitlab/faros_users.d.ts +2 -2
- package/lib/converters/gitlab/faros_users.js +14 -1
- package/lib/converters/gitlab/faros_users.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { AirbyteRecord } from 'faros-airbyte-cdk';
|
|
2
|
+
import { DestinationModel, DestinationRecord } from '../converter';
|
|
3
|
+
import { GitlabConverter } from './common';
|
|
4
|
+
export declare class FarosEpics extends GitlabConverter {
|
|
5
|
+
readonly destinationModels: ReadonlyArray<DestinationModel>;
|
|
6
|
+
id(record: AirbyteRecord): string;
|
|
7
|
+
convert(record: AirbyteRecord): Promise<ReadonlyArray<DestinationRecord>>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FarosEpics = void 0;
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
|
+
const common_1 = require("./common");
|
|
6
|
+
class FarosEpics extends common_1.GitlabConverter {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.destinationModels = ['tms_Epic'];
|
|
10
|
+
}
|
|
11
|
+
id(record) {
|
|
12
|
+
var _a;
|
|
13
|
+
const epic = (_a = record === null || record === void 0 ? void 0 : record.record) === null || _a === void 0 ? void 0 : _a.data;
|
|
14
|
+
return String(epic === null || epic === void 0 ? void 0 : epic.id);
|
|
15
|
+
}
|
|
16
|
+
async convert(record) {
|
|
17
|
+
const epic = record.record.data;
|
|
18
|
+
const res = [];
|
|
19
|
+
if (!(epic === null || epic === void 0 ? void 0 : epic.id)) {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
const uid = String(epic.id);
|
|
23
|
+
const category = epic.state === 'opened' ? 'Todo' : 'Done';
|
|
24
|
+
res.push({
|
|
25
|
+
model: 'tms_Epic',
|
|
26
|
+
record: {
|
|
27
|
+
uid,
|
|
28
|
+
name: epic.title,
|
|
29
|
+
description: faros_js_client_1.Utils.cleanAndTruncate(epic.description, common_1.GitlabCommon.MAX_DESCRIPTION_LENGTH),
|
|
30
|
+
status: { category, detail: epic.state },
|
|
31
|
+
project: {
|
|
32
|
+
uid: epic.group_id,
|
|
33
|
+
source: this.streamName.source,
|
|
34
|
+
},
|
|
35
|
+
createdAt: faros_js_client_1.Utils.toDate(epic.created_at),
|
|
36
|
+
updatedAt: faros_js_client_1.Utils.toDate(epic.updated_at),
|
|
37
|
+
source: this.streamName.source,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
return res;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.FarosEpics = FarosEpics;
|
|
44
|
+
//# sourceMappingURL=faros_epics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faros_epics.js","sourceRoot":"","sources":["../../../src/converters/gitlab/faros_epics.ts"],"names":[],"mappings":";;;AAEA,qDAAsC;AAGtC,qCAAuD;AAEvD,MAAa,UAAW,SAAQ,wBAAe;IAA/C;;QACW,sBAAiB,GAAoC,CAAC,UAAU,CAAC,CAAC;IA0C7E,CAAC;IAxCC,EAAE,CAAC,MAAqB;;QACtB,MAAM,IAAI,GAAG,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,CAAC;IACb,CAAC;CACF;AA3CD,gCA2CC"}
|
|
@@ -5,4 +5,7 @@ export declare class FarosIssues extends GitlabConverter {
|
|
|
5
5
|
readonly destinationModels: ReadonlyArray<DestinationModel>;
|
|
6
6
|
id(record: AirbyteRecord): string;
|
|
7
7
|
convert(record: AirbyteRecord): Promise<ReadonlyArray<DestinationRecord>>;
|
|
8
|
+
private mapIssueType;
|
|
9
|
+
private buildStatusChangelog;
|
|
10
|
+
private processSprintHistory;
|
|
8
11
|
}
|
|
@@ -9,6 +9,7 @@ class FarosIssues extends common_1.GitlabConverter {
|
|
|
9
9
|
super(...arguments);
|
|
10
10
|
this.destinationModels = [
|
|
11
11
|
'tms_Label',
|
|
12
|
+
'tms_SprintHistory',
|
|
12
13
|
'tms_Task',
|
|
13
14
|
'tms_TaskAssignment',
|
|
14
15
|
'tms_TaskBoardRelationship',
|
|
@@ -22,7 +23,7 @@ class FarosIssues extends common_1.GitlabConverter {
|
|
|
22
23
|
return String(issue === null || issue === void 0 ? void 0 : issue.id);
|
|
23
24
|
}
|
|
24
25
|
async convert(record) {
|
|
25
|
-
var _a, _b;
|
|
26
|
+
var _a, _b, _c, _d, _e;
|
|
26
27
|
const issue = record.record.data;
|
|
27
28
|
const res = [];
|
|
28
29
|
if (!(issue === null || issue === void 0 ? void 0 : issue.id)) {
|
|
@@ -30,6 +31,14 @@ class FarosIssues extends common_1.GitlabConverter {
|
|
|
30
31
|
}
|
|
31
32
|
const uid = String(issue.id);
|
|
32
33
|
const taskKey = { uid, source: this.streamName.source };
|
|
34
|
+
const createdAt = faros_js_client_1.Utils.toDate(issue.created_at);
|
|
35
|
+
const closedAt = faros_js_client_1.Utils.toDate(issue.closed_at);
|
|
36
|
+
// Build status changelog from state events
|
|
37
|
+
const statusChangelog = this.buildStatusChangelog(issue, issue.state_events || [], createdAt, closedAt);
|
|
38
|
+
// Get the latest status change timestamp
|
|
39
|
+
const statusChangedAt = statusChangelog.length > 0
|
|
40
|
+
? statusChangelog[statusChangelog.length - 1].changedAt
|
|
41
|
+
: createdAt;
|
|
33
42
|
// Handle assignees
|
|
34
43
|
(_a = issue.assignee_usernames) === null || _a === void 0 ? void 0 : _a.forEach((username) => {
|
|
35
44
|
if (username) {
|
|
@@ -59,6 +68,7 @@ class FarosIssues extends common_1.GitlabConverter {
|
|
|
59
68
|
});
|
|
60
69
|
// Create the task record
|
|
61
70
|
const category = issue.state === 'opened' ? 'Todo' : 'Done';
|
|
71
|
+
const type = this.mapIssueType(issue.issue_type);
|
|
62
72
|
res.push({
|
|
63
73
|
model: 'tms_Task',
|
|
64
74
|
record: {
|
|
@@ -66,12 +76,26 @@ class FarosIssues extends common_1.GitlabConverter {
|
|
|
66
76
|
name: issue.title,
|
|
67
77
|
description: faros_js_client_1.Utils.cleanAndTruncate(issue.description, common_1.GitlabCommon.MAX_DESCRIPTION_LENGTH),
|
|
68
78
|
status: { category, detail: issue.state },
|
|
79
|
+
statusChangelog,
|
|
80
|
+
statusChangedAt,
|
|
81
|
+
type,
|
|
82
|
+
url: issue.web_url,
|
|
83
|
+
points: (_c = issue.weight) !== null && _c !== void 0 ? _c : null,
|
|
69
84
|
creator: issue.author_username
|
|
70
85
|
? { uid: issue.author_username, source: this.streamName.source }
|
|
71
86
|
: null,
|
|
72
|
-
createdAt
|
|
87
|
+
createdAt,
|
|
73
88
|
updatedAt: faros_js_client_1.Utils.toDate(issue.updated_at),
|
|
74
89
|
source: this.streamName.source,
|
|
90
|
+
...(((_d = issue.epic) === null || _d === void 0 ? void 0 : _d.id) && {
|
|
91
|
+
epic: { uid: `${issue.epic.id}`, source: this.streamName.source },
|
|
92
|
+
}),
|
|
93
|
+
...(((_e = issue.iteration) === null || _e === void 0 ? void 0 : _e.id) && {
|
|
94
|
+
sprint: {
|
|
95
|
+
uid: `${issue.iteration.id}`,
|
|
96
|
+
source: this.streamName.source,
|
|
97
|
+
},
|
|
98
|
+
}),
|
|
75
99
|
},
|
|
76
100
|
});
|
|
77
101
|
// Link task to project (at group level)
|
|
@@ -96,6 +120,108 @@ class FarosIssues extends common_1.GitlabConverter {
|
|
|
96
120
|
},
|
|
97
121
|
},
|
|
98
122
|
});
|
|
123
|
+
// Process sprint history from iteration events
|
|
124
|
+
const sprintHistory = this.processSprintHistory(uid, issue.iteration_events || []);
|
|
125
|
+
res.push(...sprintHistory);
|
|
126
|
+
return res;
|
|
127
|
+
}
|
|
128
|
+
mapIssueType(issueType) {
|
|
129
|
+
switch ((0, lodash_1.toLower)(issueType)) {
|
|
130
|
+
case 'issue':
|
|
131
|
+
return { category: 'Story', detail: issueType };
|
|
132
|
+
case 'task':
|
|
133
|
+
return { category: 'Task', detail: issueType };
|
|
134
|
+
case 'incident':
|
|
135
|
+
case 'test_case':
|
|
136
|
+
default:
|
|
137
|
+
return { category: 'Custom', detail: issueType };
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
buildStatusChangelog(issue, stateEvents, createdAt, closedAt) {
|
|
141
|
+
const changelog = [];
|
|
142
|
+
// Always start with the creation event
|
|
143
|
+
changelog.push({
|
|
144
|
+
changedAt: createdAt,
|
|
145
|
+
status: { category: 'Todo', detail: 'opened' },
|
|
146
|
+
});
|
|
147
|
+
// Process state events to capture reopened/closed transitions
|
|
148
|
+
for (const event of stateEvents) {
|
|
149
|
+
const eventDate = faros_js_client_1.Utils.toDate(event.created_at);
|
|
150
|
+
if (!eventDate)
|
|
151
|
+
continue;
|
|
152
|
+
if (event.state === 'closed') {
|
|
153
|
+
changelog.push({
|
|
154
|
+
changedAt: eventDate,
|
|
155
|
+
status: { category: 'Done', detail: 'closed' },
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
else if (event.state === 'reopened') {
|
|
159
|
+
changelog.push({
|
|
160
|
+
changedAt: eventDate,
|
|
161
|
+
status: { category: 'Todo', detail: 'reopened' },
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
// If no state events captured the final closed state, add it
|
|
166
|
+
if (issue.state === 'closed' &&
|
|
167
|
+
closedAt &&
|
|
168
|
+
changelog.at(-1).status.detail !== 'closed') {
|
|
169
|
+
changelog.push({
|
|
170
|
+
changedAt: closedAt,
|
|
171
|
+
status: { category: 'Done', detail: 'closed' },
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
// Sort by date to ensure chronological order
|
|
175
|
+
return changelog.sort((a, b) => a.changedAt.getTime() - b.changedAt.getTime());
|
|
176
|
+
}
|
|
177
|
+
processSprintHistory(taskUid, iterationEvents) {
|
|
178
|
+
const res = [];
|
|
179
|
+
// Group events by iteration ID
|
|
180
|
+
const eventsByIteration = new Map();
|
|
181
|
+
for (const event of iterationEvents) {
|
|
182
|
+
if (!event.iteration)
|
|
183
|
+
continue;
|
|
184
|
+
const sprintUid = `${event.iteration.id}`;
|
|
185
|
+
if (!eventsByIteration.has(sprintUid)) {
|
|
186
|
+
eventsByIteration.set(sprintUid, []);
|
|
187
|
+
}
|
|
188
|
+
eventsByIteration.get(sprintUid).push(event);
|
|
189
|
+
}
|
|
190
|
+
// Process each iteration's events
|
|
191
|
+
for (const [sprintUid, events] of eventsByIteration) {
|
|
192
|
+
// Sort events by timestamp to get chronological order
|
|
193
|
+
const sortedEvents = events
|
|
194
|
+
.filter((event) => faros_js_client_1.Utils.toDate(event.created_at))
|
|
195
|
+
.sort((a, b) => faros_js_client_1.Utils.toDate(a.created_at).getTime() -
|
|
196
|
+
faros_js_client_1.Utils.toDate(b.created_at).getTime());
|
|
197
|
+
if (sortedEvents.length === 0)
|
|
198
|
+
continue;
|
|
199
|
+
let addedAt = null;
|
|
200
|
+
let removedAt = null;
|
|
201
|
+
// Process events chronologically to find final state
|
|
202
|
+
for (const event of sortedEvents) {
|
|
203
|
+
const eventDate = faros_js_client_1.Utils.toDate(event.created_at);
|
|
204
|
+
if (event.action === 'add') {
|
|
205
|
+
addedAt = eventDate;
|
|
206
|
+
removedAt = null; // Reset removal if re-added
|
|
207
|
+
}
|
|
208
|
+
else if (event.action === 'remove') {
|
|
209
|
+
removedAt = eventDate;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// Only write record if there was at least one add event
|
|
213
|
+
if (addedAt) {
|
|
214
|
+
res.push({
|
|
215
|
+
model: 'tms_SprintHistory',
|
|
216
|
+
record: {
|
|
217
|
+
task: { uid: taskUid, source: this.streamName.source },
|
|
218
|
+
sprint: { uid: sprintUid, source: this.streamName.source },
|
|
219
|
+
addedAt,
|
|
220
|
+
...(removedAt && { removedAt }),
|
|
221
|
+
},
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
}
|
|
99
225
|
return res;
|
|
100
226
|
}
|
|
101
227
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"faros_issues.js","sourceRoot":"","sources":["../../../src/converters/gitlab/faros_issues.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"faros_issues.js","sourceRoot":"","sources":["../../../src/converters/gitlab/faros_issues.ts"],"names":[],"mappings":";;;AAMA,qDAAsC;AACtC,mCAA+B;AAG/B,qCAAuD;AAEvD,MAAa,WAAY,SAAQ,wBAAe;IAAhD;;QACW,sBAAiB,GAAoC;YAC5D,WAAW;YACX,mBAAmB;YACnB,UAAU;YACV,oBAAoB;YACpB,2BAA2B;YAC3B,6BAA6B;YAC7B,aAAa;SACd,CAAC;IAgRJ,CAAC;IA9QC,EAAE,CAAC,MAAqB;;QACtB,MAAM,KAAK,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,0CAAE,IAAwB,CAAC;QACvD,OAAO,MAAM,CAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,EAAE,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,OAAO,CACX,MAAqB;;QAErB,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAwB,CAAC;QACrD,MAAM,GAAG,GAAwB,EAAE,CAAC;QAEpC,IAAI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL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BACN,IAAI,EAAE,EAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAC;wBACpD,MAAM,EAAE,EAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,EAAC;wBACxD,OAAO;wBACP,GAAG,CAAC,SAAS,IAAI,EAAC,SAAS,EAAC,CAAC;qBAC9B;iBACF,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO,GAAG,CAAC;IACb,CAAC;CACF;AAzRD,kCAyRC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AirbyteRecord } from 'faros-airbyte-cdk';
|
|
2
|
+
import { DestinationModel, DestinationRecord } from '../converter';
|
|
3
|
+
import { GitlabConverter } from './common';
|
|
4
|
+
export declare class FarosIterations extends GitlabConverter {
|
|
5
|
+
readonly destinationModels: ReadonlyArray<DestinationModel>;
|
|
6
|
+
id(record: AirbyteRecord): string;
|
|
7
|
+
convert(record: AirbyteRecord): Promise<ReadonlyArray<DestinationRecord>>;
|
|
8
|
+
private mapIterationState;
|
|
9
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FarosIterations = void 0;
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
|
+
const luxon_1 = require("luxon");
|
|
6
|
+
const common_1 = require("./common");
|
|
7
|
+
class FarosIterations extends common_1.GitlabConverter {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.destinationModels = ['tms_Sprint'];
|
|
11
|
+
}
|
|
12
|
+
id(record) {
|
|
13
|
+
var _a;
|
|
14
|
+
const iteration = (_a = record === null || record === void 0 ? void 0 : record.record) === null || _a === void 0 ? void 0 : _a.data;
|
|
15
|
+
return String(iteration === null || iteration === void 0 ? void 0 : iteration.id);
|
|
16
|
+
}
|
|
17
|
+
async convert(record) {
|
|
18
|
+
const iteration = record.record.data;
|
|
19
|
+
const res = [];
|
|
20
|
+
if (!(iteration === null || iteration === void 0 ? void 0 : iteration.id)) {
|
|
21
|
+
return [];
|
|
22
|
+
}
|
|
23
|
+
const uid = String(iteration.id);
|
|
24
|
+
const status = this.mapIterationState(iteration.state);
|
|
25
|
+
// Calculate closedAt as end-of-day of due_date
|
|
26
|
+
const endedAt = faros_js_client_1.Utils.toDate(iteration.due_date);
|
|
27
|
+
const closedAt = endedAt
|
|
28
|
+
? luxon_1.DateTime.fromJSDate(endedAt).setZone('UTC').endOf('day').toJSDate()
|
|
29
|
+
: null;
|
|
30
|
+
res.push({
|
|
31
|
+
model: 'tms_Sprint',
|
|
32
|
+
record: {
|
|
33
|
+
uid,
|
|
34
|
+
name: iteration.title || `Iteration ${iteration.iid}`,
|
|
35
|
+
description: faros_js_client_1.Utils.cleanAndTruncate(iteration.description, common_1.GitlabCommon.MAX_DESCRIPTION_LENGTH),
|
|
36
|
+
state: status,
|
|
37
|
+
startedAt: faros_js_client_1.Utils.toDate(iteration.start_date),
|
|
38
|
+
openedAt: faros_js_client_1.Utils.toDate(iteration.start_date),
|
|
39
|
+
endedAt,
|
|
40
|
+
closedAt,
|
|
41
|
+
source: this.streamName.source,
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
return res;
|
|
45
|
+
}
|
|
46
|
+
mapIterationState(state) {
|
|
47
|
+
switch (state) {
|
|
48
|
+
case 1:
|
|
49
|
+
return 'Future';
|
|
50
|
+
case 2:
|
|
51
|
+
return 'Active';
|
|
52
|
+
case 3:
|
|
53
|
+
return 'Closed';
|
|
54
|
+
default:
|
|
55
|
+
return 'Closed';
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.FarosIterations = FarosIterations;
|
|
60
|
+
//# sourceMappingURL=faros_iterations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"faros_iterations.js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KAAK,IAAI,aAAa,SAAS,CAAC,GAAG,EAAE;gBACrD,WAAW,EAAE,uBAAK,CAAC,gBAAgB,CACjC,SAAS,CAAC,WAAW,EACrB,qBAAY,CAAC,sBAAsB,CACpC;gBACD,KAAK,EAAE,MAAM;gBACb,SAAS,EAAE,uBAAK,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC;gBAC7C,QAAQ,EAAE,uBAAK,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC;gBAC5C,OAAO;gBACP,QAAQ;gBACR,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM;aAC/B;SACF,CAAC,CAAC;QAEH,OAAO,GAAG,CAAC;IACb,CAAC;IAEO,iBAAiB,CAAC,KAAa;QACrC,QAAQ,KAAK,EAAE,CAAC;YACd,KAAK,CAAC;gBACJ,OAAO,QAAQ,CAAC;YAClB,KAAK,CAAC;gBACJ,OAAO,QAAQ,CAAC;YAClB,KAAK,CAAC;gBACJ,OAAO,QAAQ,CAAC;YAClB;gBACE,OAAO,QAAQ,CAAC;QACpB,CAAC;IACH,CAAC;CACF;AA5DD,0CA4DC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AirbyteRecord } from 'faros-airbyte-cdk';
|
|
2
|
-
import { DestinationModel, DestinationRecord } from '../converter';
|
|
2
|
+
import { DestinationModel, DestinationRecord, StreamContext } from '../converter';
|
|
3
3
|
import { GitlabConverter } from './common';
|
|
4
4
|
export declare class FarosUsers extends GitlabConverter {
|
|
5
5
|
readonly destinationModels: ReadonlyArray<DestinationModel>;
|
|
6
6
|
id(record: AirbyteRecord): string;
|
|
7
|
-
convert(record: AirbyteRecord): Promise<ReadonlyArray<DestinationRecord>>;
|
|
7
|
+
convert(record: AirbyteRecord, ctx: StreamContext): Promise<ReadonlyArray<DestinationRecord>>;
|
|
8
8
|
}
|
|
@@ -10,6 +10,7 @@ class FarosUsers extends common_1.GitlabConverter {
|
|
|
10
10
|
'vcs_Membership',
|
|
11
11
|
'vcs_User',
|
|
12
12
|
'vcs_UserEmail',
|
|
13
|
+
'tms_User',
|
|
13
14
|
];
|
|
14
15
|
}
|
|
15
16
|
id(record) {
|
|
@@ -17,7 +18,7 @@ class FarosUsers extends common_1.GitlabConverter {
|
|
|
17
18
|
const user = (_a = record === null || record === void 0 ? void 0 : record.record) === null || _a === void 0 ? void 0 : _a.data;
|
|
18
19
|
return `${user === null || user === void 0 ? void 0 : user.username}`;
|
|
19
20
|
}
|
|
20
|
-
async convert(record) {
|
|
21
|
+
async convert(record, ctx) {
|
|
21
22
|
const user = record.record.data;
|
|
22
23
|
if (!(user === null || user === void 0 ? void 0 : user.username)) {
|
|
23
24
|
return [];
|
|
@@ -58,6 +59,18 @@ class FarosUsers extends common_1.GitlabConverter {
|
|
|
58
59
|
type: { category: 'User', detail: 'user' },
|
|
59
60
|
}, (value) => (0, lodash_1.isNil)(value) || (0, lodash_1.isEmpty)(value)),
|
|
60
61
|
});
|
|
62
|
+
// Also write tms_User if TMS is enabled
|
|
63
|
+
if (this.tmsEnabled(ctx)) {
|
|
64
|
+
res.push({
|
|
65
|
+
model: 'tms_User',
|
|
66
|
+
record: (0, lodash_1.omitBy)({
|
|
67
|
+
uid: user.username,
|
|
68
|
+
source: this.streamName.source,
|
|
69
|
+
name: user.name,
|
|
70
|
+
emailAddress: user.email,
|
|
71
|
+
}, (value) => (0, lodash_1.isNil)(value) || (0, lodash_1.isEmpty)(value)),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
61
74
|
return res;
|
|
62
75
|
}
|
|
63
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"faros_users.js","sourceRoot":"","sources":["../../../src/converters/gitlab/faros_users.ts"],"names":[],"mappings":";;;AAEA,mCAAuD;AAGvD,qCAAyC;AAEzC,MAAa,UAAW,SAAQ,wBAAe;IAA/C;;QACW,sBAAiB,GAAoC;YAC5D,gBAAgB;YAChB,UAAU;YACV,eAAe;
|
|
1
|
+
{"version":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