airbyte-faros-destination 0.4.32 → 0.4.39
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/common/graphql-client.d.ts +1 -1
- package/lib/converters/agileaccelerator/common.js +2 -2
- package/lib/converters/asana/projects.js +3 -3
- package/lib/converters/asana/stories.js +3 -3
- package/lib/converters/asana/tasks.js +4 -4
- package/lib/converters/azure-repos/pull_requests.js +6 -6
- package/lib/converters/azure-repos/repositories.js +3 -3
- package/lib/converters/azureactivedirectory/users.js +2 -2
- package/lib/converters/azurepipeline/builds.js +8 -8
- package/lib/converters/azurepipeline/common.js +4 -4
- package/lib/converters/azurepipeline/pipelines.js +3 -3
- package/lib/converters/azurepipeline/releases.js +3 -3
- package/lib/converters/backlog/issues.js +6 -6
- package/lib/converters/backlog/projects.js +5 -5
- package/lib/converters/bamboohr/users.js +3 -3
- package/lib/converters/bitbucket/commits.js +2 -2
- package/lib/converters/bitbucket/common.js +3 -3
- package/lib/converters/bitbucket/deployments.js +2 -2
- package/lib/converters/bitbucket/issues.js +3 -3
- package/lib/converters/bitbucket/pipeline_steps.js +3 -3
- package/lib/converters/bitbucket/pipelines.js +3 -3
- package/lib/converters/bitbucket/pull_request_activities.js +4 -4
- package/lib/converters/bitbucket/pull_requests.js +4 -4
- package/lib/converters/bitbucket/repositories.js +3 -3
- package/lib/converters/bitbucket/workspaces.js +2 -2
- package/lib/converters/bitbucket-server/commits.js +2 -2
- package/lib/converters/bitbucket-server/pull_request_activities.js +5 -5
- package/lib/converters/bitbucket-server/pull_requests.js +3 -3
- package/lib/converters/buildkite/builds.js +7 -7
- package/lib/converters/buildkite/common.js +10 -10
- package/lib/converters/circleci/pipelines.js +6 -6
- package/lib/converters/converter.d.ts +1 -1
- package/lib/converters/datadog/incidents.js +4 -4
- package/lib/converters/docker/tags.js +2 -2
- package/lib/converters/faros-feeds/faros_feed.js +2 -2
- package/lib/converters/firehydrant/incidents.js +4 -4
- package/lib/converters/github/commits.js +2 -2
- package/lib/converters/github/common.js +4 -4
- package/lib/converters/github/issues.js +3 -3
- package/lib/converters/github/organizations.js +2 -2
- package/lib/converters/github/pull_requests.js +4 -4
- package/lib/converters/github/releases.js +3 -3
- package/lib/converters/github/repositories.js +3 -3
- package/lib/converters/github/review_comments.js +3 -3
- package/lib/converters/github/reviews.js +2 -2
- package/lib/converters/github/workflow_runs.js +4 -4
- package/lib/converters/gitlab/commits.js +2 -2
- package/lib/converters/gitlab/common.js +3 -3
- package/lib/converters/gitlab/groups.js +2 -2
- package/lib/converters/gitlab/issues.js +3 -3
- package/lib/converters/gitlab/jobs.js +4 -4
- package/lib/converters/gitlab/merge_request_commits.js +2 -2
- package/lib/converters/gitlab/merge_requests.js +5 -5
- package/lib/converters/gitlab/pipelines.js +4 -4
- package/lib/converters/gitlab/projects.js +4 -4
- package/lib/converters/gitlab/releases.js +3 -3
- package/lib/converters/gitlab-ci/jobs.js +4 -4
- package/lib/converters/gitlab-ci/pipelines.js +3 -3
- package/lib/converters/googlecalendar/events.js +3 -3
- package/lib/converters/harness/executions.js +5 -5
- package/lib/converters/jenkins/builds.js +3 -3
- package/lib/converters/jira/issues.js +10 -10
- package/lib/converters/jira/project_versions.js +3 -3
- package/lib/converters/jira/sprints.js +4 -4
- package/lib/converters/okta/users.js +2 -2
- package/lib/converters/opsgenie/incidents.js +4 -4
- package/lib/converters/pagerduty/incident_log_entries.js +2 -2
- package/lib/converters/pagerduty/incidents.js +4 -4
- package/lib/converters/phabricator/commits.js +2 -2
- package/lib/converters/phabricator/common.js +2 -2
- package/lib/converters/phabricator/projects.js +3 -3
- package/lib/converters/phabricator/repositories.js +3 -3
- package/lib/converters/phabricator/revisions.js +3 -3
- package/lib/converters/phabricator/transactions.js +2 -2
- package/lib/converters/servicenow/incidents.js +4 -4
- package/lib/converters/shortcut/iterations.js +3 -3
- package/lib/converters/shortcut/stories.js +5 -5
- package/lib/converters/squadcast/events.js +2 -2
- package/lib/converters/squadcast/incidents.js +4 -4
- package/lib/converters/statuspage/incident_updates.js +2 -2
- package/lib/converters/statuspage/incidents.js +6 -6
- package/lib/converters/victorops/incidents.js +5 -5
- package/lib/destination.d.ts +1 -1
- package/lib/destination.js +4 -3
- package/lib/destination.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PullRequestActivities = void 0;
|
|
4
4
|
const bitbucket_server_1 = require("faros-airbyte-common/bitbucket-server");
|
|
5
|
-
const
|
|
5
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
class PullRequestActivities extends common_1.BitbucketServerConverter {
|
|
8
8
|
constructor() {
|
|
@@ -35,8 +35,8 @@ class PullRequestActivities extends common_1.BitbucketServerConverter {
|
|
|
35
35
|
uid: id.toString(),
|
|
36
36
|
pullRequest,
|
|
37
37
|
comment: activity.comment.text,
|
|
38
|
-
createdAt:
|
|
39
|
-
updatedAt:
|
|
38
|
+
createdAt: faros_js_client_1.Utils.toDate(activity.comment.createdDate),
|
|
39
|
+
updatedAt: faros_js_client_1.Utils.toDate(activity.comment.updatedDate),
|
|
40
40
|
author,
|
|
41
41
|
},
|
|
42
42
|
});
|
|
@@ -56,7 +56,7 @@ class PullRequestActivities extends common_1.BitbucketServerConverter {
|
|
|
56
56
|
repository: pullRequest.repository,
|
|
57
57
|
}
|
|
58
58
|
: undefined,
|
|
59
|
-
mergedAt:
|
|
59
|
+
mergedAt: faros_js_client_1.Utils.toDate(activity.createdDate),
|
|
60
60
|
},
|
|
61
61
|
},
|
|
62
62
|
});
|
|
@@ -70,7 +70,7 @@ class PullRequestActivities extends common_1.BitbucketServerConverter {
|
|
|
70
70
|
pullRequest,
|
|
71
71
|
reviewer: author,
|
|
72
72
|
state: reviewState(activity.action),
|
|
73
|
-
submittedAt:
|
|
73
|
+
submittedAt: faros_js_client_1.Utils.toDate(activity.createdDate),
|
|
74
74
|
},
|
|
75
75
|
});
|
|
76
76
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PullRequests = void 0;
|
|
4
4
|
const bitbucket_server_1 = require("faros-airbyte-common/bitbucket-server");
|
|
5
|
-
const
|
|
5
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
var PullRequestStateCategory;
|
|
8
8
|
(function (PullRequestStateCategory) {
|
|
@@ -45,8 +45,8 @@ class PullRequests extends common_1.BitbucketServerConverter {
|
|
|
45
45
|
description: pr.description,
|
|
46
46
|
state: prState(pr.state),
|
|
47
47
|
htmlUrl: (0, bitbucket_server_1.selfHRef)(pr.links),
|
|
48
|
-
createdAt:
|
|
49
|
-
updatedAt:
|
|
48
|
+
createdAt: faros_js_client_1.Utils.toDate(pr.createdDate),
|
|
49
|
+
updatedAt: faros_js_client_1.Utils.toDate(pr.updatedDate),
|
|
50
50
|
commentCount: pr.properties.commentCount,
|
|
51
51
|
author,
|
|
52
52
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Builds = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const lodash_1 = require("lodash");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
class Builds extends common_1.BuildkiteConverter {
|
|
@@ -23,9 +23,9 @@ class Builds extends common_1.BuildkiteConverter {
|
|
|
23
23
|
uid: build.pipeline.slug,
|
|
24
24
|
organization: { uid: build.pipeline.organization.slug, source },
|
|
25
25
|
};
|
|
26
|
-
const createdAt =
|
|
27
|
-
const startedAt =
|
|
28
|
-
const endedAt =
|
|
26
|
+
const createdAt = faros_js_client_1.Utils.toDate(build.createdAt);
|
|
27
|
+
const startedAt = faros_js_client_1.Utils.toDate(build.startedAt);
|
|
28
|
+
const endedAt = faros_js_client_1.Utils.toDate(build.finishedAt);
|
|
29
29
|
const status = this.convertBuildState(build.state);
|
|
30
30
|
const res = [];
|
|
31
31
|
const buildKey = {
|
|
@@ -55,9 +55,9 @@ class Builds extends common_1.BuildkiteConverter {
|
|
|
55
55
|
...this.convertBuildStepTime(job),
|
|
56
56
|
command: job.command,
|
|
57
57
|
type: this.convertBuildStepType(job.type),
|
|
58
|
-
createdAt:
|
|
59
|
-
startedAt:
|
|
60
|
-
endedAt:
|
|
58
|
+
createdAt: faros_js_client_1.Utils.toDate(job.createdAt),
|
|
59
|
+
startedAt: faros_js_client_1.Utils.toDate(job.startedAt),
|
|
60
|
+
endedAt: faros_js_client_1.Utils.toDate(job.finishedAt),
|
|
61
61
|
status: this.convertBuildStepState(job.state),
|
|
62
62
|
url: job.url,
|
|
63
63
|
build: buildKey,
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.BuildkiteConverter = exports.JobCategory = exports.JobType = exports.BuildStateCategory = exports.RepoSource = void 0;
|
|
7
|
-
const
|
|
7
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
8
8
|
const git_url_parse_1 = __importDefault(require("git-url-parse"));
|
|
9
9
|
const converter_1 = require("../converter");
|
|
10
10
|
var RepoSource;
|
|
@@ -83,20 +83,20 @@ class BuildkiteConverter extends converter_1.Converter {
|
|
|
83
83
|
convertBuildStepTime(buildStep) {
|
|
84
84
|
const type = buildStep.type;
|
|
85
85
|
const result = {
|
|
86
|
-
createdAt:
|
|
87
|
-
startedAt:
|
|
88
|
-
endedAt:
|
|
86
|
+
createdAt: faros_js_client_1.Utils.toDate(buildStep.createdAt),
|
|
87
|
+
startedAt: faros_js_client_1.Utils.toDate(buildStep.startedAt),
|
|
88
|
+
endedAt: faros_js_client_1.Utils.toDate(buildStep.finishedAt),
|
|
89
89
|
};
|
|
90
90
|
switch (type) {
|
|
91
91
|
case JobType.JobTypeBlock:
|
|
92
|
-
result.createdAt =
|
|
93
|
-
result.startedAt =
|
|
94
|
-
result.endedAt =
|
|
92
|
+
result.createdAt = faros_js_client_1.Utils.toDate(buildStep.unblockedAt);
|
|
93
|
+
result.startedAt = faros_js_client_1.Utils.toDate(buildStep.unblockedAt);
|
|
94
|
+
result.endedAt = faros_js_client_1.Utils.toDate(buildStep.unblockedAt);
|
|
95
95
|
break;
|
|
96
96
|
case JobType.JobTypeTrigger:
|
|
97
|
-
result.createdAt =
|
|
98
|
-
result.startedAt =
|
|
99
|
-
result.endedAt =
|
|
97
|
+
result.createdAt = faros_js_client_1.Utils.toDate(buildStep.createdAt);
|
|
98
|
+
result.startedAt = faros_js_client_1.Utils.toDate(buildStep.startedAt);
|
|
99
|
+
result.endedAt = faros_js_client_1.Utils.toDate(buildStep.finishedAt);
|
|
100
100
|
break;
|
|
101
101
|
case JobType.JobTypeWait: // This type does not currently have timestamps
|
|
102
102
|
case JobType.JobTypeCommand:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Pipelines = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const lodash_1 = require("lodash");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
class Pipelines extends common_1.CircleCIConverter {
|
|
@@ -27,9 +27,9 @@ class Pipelines extends common_1.CircleCIConverter {
|
|
|
27
27
|
...buildKey,
|
|
28
28
|
number: pipeline.number,
|
|
29
29
|
name: `${common_1.CircleCICommon.getProject(pipeline.project_slug)}_${pipeline.number}_${workflow.name}`,
|
|
30
|
-
createdAt:
|
|
31
|
-
startedAt:
|
|
32
|
-
endedAt:
|
|
30
|
+
createdAt: faros_js_client_1.Utils.toDate(workflow.created_at),
|
|
31
|
+
startedAt: faros_js_client_1.Utils.toDate(workflow.created_at),
|
|
32
|
+
endedAt: faros_js_client_1.Utils.toDate(workflow.stopped_at),
|
|
33
33
|
status: common_1.CircleCICommon.convertStatus(workflow.status),
|
|
34
34
|
},
|
|
35
35
|
});
|
|
@@ -57,8 +57,8 @@ class Pipelines extends common_1.CircleCIConverter {
|
|
|
57
57
|
record: {
|
|
58
58
|
uid: (0, lodash_1.toLower)(job.id),
|
|
59
59
|
name: job.name,
|
|
60
|
-
startedAt:
|
|
61
|
-
endedAt:
|
|
60
|
+
startedAt: faros_js_client_1.Utils.toDate(job.started_at),
|
|
61
|
+
endedAt: faros_js_client_1.Utils.toDate(job.stopped_at),
|
|
62
62
|
status: common_1.CircleCICommon.convertStatus(job.status),
|
|
63
63
|
type: common_1.CircleCICommon.convertJobType(job.type),
|
|
64
64
|
build: buildKey,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AirbyteLogger, AirbyteRecord } from 'faros-airbyte-cdk';
|
|
2
|
-
import { FarosClient } from 'faros-
|
|
2
|
+
import { FarosClient } from 'faros-js-client';
|
|
3
3
|
import { Dictionary } from 'ts-essentials';
|
|
4
4
|
import { DestinationConfig } from '../common/types';
|
|
5
5
|
/** Airbyte -> Faros record converter */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Incidents = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const common_1 = require("../common/common");
|
|
6
6
|
const common_2 = require("./common");
|
|
7
7
|
var IncidentStatusCategory;
|
|
@@ -48,9 +48,9 @@ class Incidents extends common_2.DatadogConverter {
|
|
|
48
48
|
severity: (_h = this.getSeverity((_g = (_f = (_e = incident.attributes) === null || _e === void 0 ? void 0 : _e.fields) === null || _f === void 0 ? void 0 : _f.severity) === null || _g === void 0 ? void 0 : _g.value)) !== null && _h !== void 0 ? _h : defaultSeverity,
|
|
49
49
|
priority: null,
|
|
50
50
|
status: (_m = this.getStatus((_l = (_k = (_j = incident.attributes) === null || _j === void 0 ? void 0 : _j.fields) === null || _k === void 0 ? void 0 : _k.state) === null || _l === void 0 ? void 0 : _l.value)) !== null && _m !== void 0 ? _m : null,
|
|
51
|
-
createdAt: (_p =
|
|
52
|
-
updatedAt: (_r =
|
|
53
|
-
resolvedAt: (_t =
|
|
51
|
+
createdAt: (_p = faros_js_client_1.Utils.toDate((_o = incident.attributes) === null || _o === void 0 ? void 0 : _o.created)) !== null && _p !== void 0 ? _p : null,
|
|
52
|
+
updatedAt: (_r = faros_js_client_1.Utils.toDate((_q = incident.attributes) === null || _q === void 0 ? void 0 : _q.modified)) !== null && _r !== void 0 ? _r : null,
|
|
53
|
+
resolvedAt: (_t = faros_js_client_1.Utils.toDate((_s = incident.attributes) === null || _s === void 0 ? void 0 : _s.resolved)) !== null && _t !== void 0 ? _t : null,
|
|
54
54
|
},
|
|
55
55
|
});
|
|
56
56
|
const assigneeUid = (_w = (_v = (_u = incident.relationships) === null || _u === void 0 ? void 0 : _u.commanderUser) === null || _v === void 0 ? void 0 : _v.data) === null || _w === void 0 ? void 0 : _w.id;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Tags = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const common_1 = require("./common");
|
|
6
6
|
class Tags extends common_1.DockerConverter {
|
|
7
7
|
constructor() {
|
|
@@ -68,7 +68,7 @@ class Tags extends common_1.DockerConverter {
|
|
|
68
68
|
uid: tag.name,
|
|
69
69
|
name: tag.name,
|
|
70
70
|
type: common_1.ARTIFACT_TYPE,
|
|
71
|
-
createdAt:
|
|
71
|
+
createdAt: faros_js_client_1.Utils.toDate(tag.imageConfig.created),
|
|
72
72
|
build: buildKey,
|
|
73
73
|
tags: cicdTags,
|
|
74
74
|
repository: repositoryKey,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FarosFeed = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const converter_1 = require("../converter");
|
|
6
6
|
const model_names_1 = require("./model_names");
|
|
7
7
|
class FarosFeed extends converter_1.Converter {
|
|
@@ -16,7 +16,7 @@ class FarosFeed extends converter_1.Converter {
|
|
|
16
16
|
}
|
|
17
17
|
async convert(record, ctx) {
|
|
18
18
|
if (!this.schema && ctx.farosClient && ctx.graph) {
|
|
19
|
-
this.schema = new
|
|
19
|
+
this.schema = new faros_js_client_1.FarosGraphSchema(await ctx.farosClient.introspect(ctx.graph));
|
|
20
20
|
}
|
|
21
21
|
const data = record.record.data;
|
|
22
22
|
if (data.state)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Incidents = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const common_1 = require("../common/common");
|
|
6
6
|
const common_2 = require("./common");
|
|
7
7
|
const models_1 = require("./models");
|
|
@@ -29,9 +29,9 @@ class Incidents extends common_2.FireHydrantConverter {
|
|
|
29
29
|
const res = [];
|
|
30
30
|
const maxDescriptionLength = this.maxDescriptionLength(ctx);
|
|
31
31
|
const incidentRef = { uid: incident.id, source };
|
|
32
|
-
const createdAt =
|
|
32
|
+
const createdAt = faros_js_client_1.Utils.toDate(incident.created_at);
|
|
33
33
|
const updatedAt = incident.events
|
|
34
|
-
?
|
|
34
|
+
? faros_js_client_1.Utils.toDate(incident.events[incident.events.length - 1].occurred_at)
|
|
35
35
|
: createdAt;
|
|
36
36
|
let acknowledgedAt = undefined;
|
|
37
37
|
let resolvedAt = undefined;
|
|
@@ -40,7 +40,7 @@ class Incidents extends common_2.FireHydrantConverter {
|
|
|
40
40
|
category: models_1.IncidentEventTypeCategory.Created,
|
|
41
41
|
detail: event.type,
|
|
42
42
|
};
|
|
43
|
-
const occurredAt =
|
|
43
|
+
const occurredAt = faros_js_client_1.Utils.toDate(event.occurred_at);
|
|
44
44
|
if (!resolvedAt &&
|
|
45
45
|
event.data.current_milestone === models_1.FirehydrantIncidentMilestone.resolved) {
|
|
46
46
|
resolvedAt = occurredAt;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Commits = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const common_1 = require("./common");
|
|
6
6
|
class Commits extends common_1.GitHubConverter {
|
|
7
7
|
constructor() {
|
|
@@ -28,7 +28,7 @@ class Commits extends common_1.GitHubConverter {
|
|
|
28
28
|
message: commit.commit.message,
|
|
29
29
|
author,
|
|
30
30
|
htmlUrl: commit.html_url,
|
|
31
|
-
createdAt:
|
|
31
|
+
createdAt: faros_js_client_1.Utils.toDate((_a = commit.commit.author) === null || _a === void 0 ? void 0 : _a.date),
|
|
32
32
|
repository,
|
|
33
33
|
source,
|
|
34
34
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GitHubConverter = exports.GitHubCommon = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const lodash_1 = require("lodash");
|
|
6
6
|
const converter_1 = require("../converter");
|
|
7
7
|
/** Common functions shares across GitHub converters */
|
|
@@ -83,8 +83,8 @@ class GitHubCommon {
|
|
|
83
83
|
...projectKey,
|
|
84
84
|
name: name,
|
|
85
85
|
description: description === null || description === void 0 ? void 0 : description.substring(0, GitHubCommon.MAX_DESCRIPTION_LENGTH),
|
|
86
|
-
createdAt:
|
|
87
|
-
updatedAt:
|
|
86
|
+
createdAt: faros_js_client_1.Utils.toDate(createdAt),
|
|
87
|
+
updatedAt: faros_js_client_1.Utils.toDate(updatedAt),
|
|
88
88
|
},
|
|
89
89
|
},
|
|
90
90
|
{
|
|
@@ -117,7 +117,7 @@ class GitHubCommon {
|
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
static parsePRnumber(pull_request_url) {
|
|
120
|
-
return
|
|
120
|
+
return faros_js_client_1.Utils.parseInteger(pull_request_url.substring(pull_request_url.lastIndexOf('/') + 1));
|
|
121
121
|
}
|
|
122
122
|
static cicd_BuildStatus(status, conclusion) {
|
|
123
123
|
const statusLower = status.toLowerCase();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Issues = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const converter_1 = require("../converter");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
class Issues extends common_1.GitHubConverter {
|
|
@@ -68,8 +68,8 @@ class Issues extends common_1.GitHubConverter {
|
|
|
68
68
|
name: issue.title,
|
|
69
69
|
description: (_d = issue.body) === null || _d === void 0 ? void 0 : _d.substring(0, common_1.GitHubCommon.MAX_DESCRIPTION_LENGTH),
|
|
70
70
|
status: { category, detail: issue.state },
|
|
71
|
-
createdAt:
|
|
72
|
-
updatedAt:
|
|
71
|
+
createdAt: faros_js_client_1.Utils.toDate(issue.created_at),
|
|
72
|
+
updatedAt: faros_js_client_1.Utils.toDate(issue.updated_at),
|
|
73
73
|
creator: user ? { uid: user.record.uid, source } : undefined,
|
|
74
74
|
source,
|
|
75
75
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Organizations = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const lodash_1 = require("lodash");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
// Github org types
|
|
@@ -28,7 +28,7 @@ class Organizations extends common_1.GitHubConverter {
|
|
|
28
28
|
name: org.name ? org.name : uid,
|
|
29
29
|
htmlUrl: org.html_url,
|
|
30
30
|
type,
|
|
31
|
-
createdAt:
|
|
31
|
+
createdAt: faros_js_client_1.Utils.toDate(org.created_at),
|
|
32
32
|
source,
|
|
33
33
|
},
|
|
34
34
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PullRequests = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const lodash_1 = require("lodash");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
const common_2 = require("./common");
|
|
@@ -48,9 +48,9 @@ class PullRequests extends common_2.GitHubConverter {
|
|
|
48
48
|
description: (_a = pr.body) === null || _a === void 0 ? void 0 : _a.substring(0, common_1.GitHubCommon.MAX_DESCRIPTION_LENGTH),
|
|
49
49
|
state,
|
|
50
50
|
htmlUrl: pr.url,
|
|
51
|
-
createdAt:
|
|
52
|
-
updatedAt:
|
|
53
|
-
mergedAt:
|
|
51
|
+
createdAt: faros_js_client_1.Utils.toDate(pr.created_at),
|
|
52
|
+
updatedAt: faros_js_client_1.Utils.toDate(pr.updated_at),
|
|
53
|
+
mergedAt: faros_js_client_1.Utils.toDate(pr.merged_at),
|
|
54
54
|
author: author ? { uid: author.record.uid, source } : null,
|
|
55
55
|
mergeCommit,
|
|
56
56
|
repository,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Releases = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const common_1 = require("./common");
|
|
6
6
|
class Releases extends common_1.GitHubConverter {
|
|
7
7
|
constructor() {
|
|
@@ -29,8 +29,8 @@ class Releases extends common_1.GitHubConverter {
|
|
|
29
29
|
notes: release.body,
|
|
30
30
|
draft: release.draft,
|
|
31
31
|
prerelease: release.prerelease,
|
|
32
|
-
createdAt:
|
|
33
|
-
publishedAt:
|
|
32
|
+
createdAt: faros_js_client_1.Utils.toDate(release.created_at),
|
|
33
|
+
publishedAt: faros_js_client_1.Utils.toDate(release.published_at),
|
|
34
34
|
author,
|
|
35
35
|
source,
|
|
36
36
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Repositories = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const common_1 = require("./common");
|
|
6
6
|
class Repositories extends common_1.GitHubConverter {
|
|
7
7
|
constructor() {
|
|
@@ -34,8 +34,8 @@ class Repositories extends common_1.GitHubConverter {
|
|
|
34
34
|
size: repo.size,
|
|
35
35
|
mainBranch: repo.default_branch,
|
|
36
36
|
htmlUrl: repo.html_url,
|
|
37
|
-
createdAt:
|
|
38
|
-
updatedAt:
|
|
37
|
+
createdAt: faros_js_client_1.Utils.toDate(repo === null || repo === void 0 ? void 0 : repo.created_at),
|
|
38
|
+
updatedAt: faros_js_client_1.Utils.toDate(repo === null || repo === void 0 ? void 0 : repo.updated_at),
|
|
39
39
|
},
|
|
40
40
|
});
|
|
41
41
|
return res;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ReviewComments = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const common_1 = require("./common");
|
|
6
6
|
class ReviewComments extends common_1.GitHubConverter {
|
|
7
7
|
constructor() {
|
|
@@ -27,8 +27,8 @@ class ReviewComments extends common_1.GitHubConverter {
|
|
|
27
27
|
number: comment.id,
|
|
28
28
|
uid: comment.id.toString(),
|
|
29
29
|
comment: comment.body,
|
|
30
|
-
createdAt:
|
|
31
|
-
updatedAt:
|
|
30
|
+
createdAt: faros_js_client_1.Utils.toDate(comment.created_at),
|
|
31
|
+
updatedAt: faros_js_client_1.Utils.toDate(comment.updated_at),
|
|
32
32
|
author,
|
|
33
33
|
pullRequest,
|
|
34
34
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Reviews = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const lodash_1 = require("lodash");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
// GitHub Review States
|
|
@@ -51,7 +51,7 @@ class Reviews extends common_1.GitHubConverter {
|
|
|
51
51
|
pullRequest,
|
|
52
52
|
reviewer: author ? { uid: author.record.uid, source } : null,
|
|
53
53
|
state,
|
|
54
|
-
submittedAt:
|
|
54
|
+
submittedAt: faros_js_client_1.Utils.toDate(review.submitted_at),
|
|
55
55
|
},
|
|
56
56
|
});
|
|
57
57
|
return res;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WorkflowRuns = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const common_1 = require("./common");
|
|
6
6
|
class WorkflowRuns extends common_1.GitHubConverter {
|
|
7
7
|
constructor() {
|
|
@@ -24,9 +24,9 @@ class WorkflowRuns extends common_1.GitHubConverter {
|
|
|
24
24
|
uid: run.id.toString(),
|
|
25
25
|
name: run.name,
|
|
26
26
|
number: run.run_number,
|
|
27
|
-
createdAt:
|
|
28
|
-
startedAt:
|
|
29
|
-
endedAt: run.conclusion ?
|
|
27
|
+
createdAt: faros_js_client_1.Utils.toDate(run.created_at),
|
|
28
|
+
startedAt: faros_js_client_1.Utils.toDate(run.run_started_at),
|
|
29
|
+
endedAt: run.conclusion ? faros_js_client_1.Utils.toDate(run.updated_at) : null,
|
|
30
30
|
status: common_1.GitHubCommon.cicd_BuildStatus(run.status, run.conclusion),
|
|
31
31
|
url: run.url,
|
|
32
32
|
pipeline,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Commits = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const common_1 = require("./common");
|
|
6
6
|
class Commits extends common_1.GitlabConverter {
|
|
7
7
|
constructor() {
|
|
@@ -23,7 +23,7 @@ class Commits extends common_1.GitlabConverter {
|
|
|
23
23
|
message: commit.message,
|
|
24
24
|
author: commit.author_name ? { uid: commit.author_name, source } : null,
|
|
25
25
|
htmlUrl: commit.web_url,
|
|
26
|
-
createdAt:
|
|
26
|
+
createdAt: faros_js_client_1.Utils.toDate(commit.created_at),
|
|
27
27
|
repository,
|
|
28
28
|
},
|
|
29
29
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GitlabConverter = exports.GitlabCommon = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const converter_1 = require("../converter");
|
|
6
6
|
/** Common functions shares across GitLab converters */
|
|
7
7
|
class GitlabCommon {
|
|
@@ -13,8 +13,8 @@ class GitlabCommon {
|
|
|
13
13
|
...projectKey,
|
|
14
14
|
name: name,
|
|
15
15
|
description: description === null || description === void 0 ? void 0 : description.substring(0, GitlabCommon.MAX_DESCRIPTION_LENGTH),
|
|
16
|
-
createdAt:
|
|
17
|
-
updatedAt:
|
|
16
|
+
createdAt: faros_js_client_1.Utils.toDate(createdAt),
|
|
17
|
+
updatedAt: faros_js_client_1.Utils.toDate(updatedAt),
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Groups = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const common_1 = require("./common");
|
|
6
6
|
class Groups extends common_1.GitlabConverter {
|
|
7
7
|
constructor() {
|
|
@@ -33,7 +33,7 @@ class Groups extends common_1.GitlabConverter {
|
|
|
33
33
|
name: group.name,
|
|
34
34
|
htmlUrl: group.web_url,
|
|
35
35
|
type: { category: 'Group', detail: '' },
|
|
36
|
-
createdAt:
|
|
36
|
+
createdAt: faros_js_client_1.Utils.toDate(group.created_at),
|
|
37
37
|
source,
|
|
38
38
|
},
|
|
39
39
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Issues = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const converter_1 = require("../converter");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
class Issues extends common_1.GitlabConverter {
|
|
@@ -69,8 +69,8 @@ class Issues extends common_1.GitlabConverter {
|
|
|
69
69
|
description: (_d = issue.description) === null || _d === void 0 ? void 0 : _d.substring(0, common_1.GitlabCommon.MAX_DESCRIPTION_LENGTH),
|
|
70
70
|
status: { category, detail: issue.state },
|
|
71
71
|
creator: username ? { uid: username, source } : null,
|
|
72
|
-
createdAt:
|
|
73
|
-
updatedAt:
|
|
72
|
+
createdAt: faros_js_client_1.Utils.toDate(issue.created_at),
|
|
73
|
+
updatedAt: faros_js_client_1.Utils.toDate(issue.updated_at),
|
|
74
74
|
url: issue.web_url,
|
|
75
75
|
source,
|
|
76
76
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Jobs = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const converter_1 = require("../converter");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
class Jobs extends common_1.GitlabConverter {
|
|
@@ -45,9 +45,9 @@ class Jobs extends common_1.GitlabConverter {
|
|
|
45
45
|
uid: String(job.id),
|
|
46
46
|
name: job.name,
|
|
47
47
|
type: this.convertBuildStepType(job.stage),
|
|
48
|
-
createdAt:
|
|
49
|
-
startedAt:
|
|
50
|
-
endedAt:
|
|
48
|
+
createdAt: faros_js_client_1.Utils.toDate(job.created_at),
|
|
49
|
+
startedAt: faros_js_client_1.Utils.toDate(job.started_at),
|
|
50
|
+
endedAt: faros_js_client_1.Utils.toDate(job.finished_at),
|
|
51
51
|
status: common_1.GitlabCommon.convertBuildStatus(job.status),
|
|
52
52
|
url: job.web_url,
|
|
53
53
|
build: buildKey,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MergeRequestCommits = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const common_1 = require("./common");
|
|
6
6
|
class MergeRequestCommits extends common_1.GitlabConverter {
|
|
7
7
|
constructor() {
|
|
@@ -24,7 +24,7 @@ class MergeRequestCommits extends common_1.GitlabConverter {
|
|
|
24
24
|
message: (_a = commit.description) === null || _a === void 0 ? void 0 : _a.substring(0, common_1.GitlabCommon.MAX_DESCRIPTION_LENGTH),
|
|
25
25
|
author: commit.author ? { uid: commit.author.username, source } : null,
|
|
26
26
|
htmlUrl: commit.web_url,
|
|
27
|
-
createdAt:
|
|
27
|
+
createdAt: faros_js_client_1.Utils.toDate(commit.created_at),
|
|
28
28
|
repository,
|
|
29
29
|
},
|
|
30
30
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MergeRequests = void 0;
|
|
4
|
-
const
|
|
4
|
+
const faros_js_client_1 = require("faros-js-client");
|
|
5
5
|
const converter_1 = require("../converter");
|
|
6
6
|
const common_1 = require("./common");
|
|
7
7
|
class MergeRequests extends common_1.GitlabConverter {
|
|
@@ -34,10 +34,10 @@ class MergeRequests extends common_1.GitlabConverter {
|
|
|
34
34
|
title: mr.title,
|
|
35
35
|
state: this.pullRequestState(mr.state),
|
|
36
36
|
htmlUrl: mr.web_url,
|
|
37
|
-
createdAt:
|
|
38
|
-
updatedAt:
|
|
39
|
-
mergedAt:
|
|
40
|
-
commentCount:
|
|
37
|
+
createdAt: faros_js_client_1.Utils.toDate(mr.created_at),
|
|
38
|
+
updatedAt: faros_js_client_1.Utils.toDate(mr.updated_at),
|
|
39
|
+
mergedAt: faros_js_client_1.Utils.toDate(mr.merged_at),
|
|
40
|
+
commentCount: faros_js_client_1.Utils.parseInteger(mr.user_notes_count),
|
|
41
41
|
author: username ? { uid: username, source } : null,
|
|
42
42
|
mergeCommit: mr.merge_commit_sha
|
|
43
43
|
? { repository, sha: mr.merge_commit_sha, uid: mr.merge_commit_sha }
|