Skip to content

Commit 8ff1a35

Browse files
committed
Resolved segment event issue
1 parent 31e0aa9 commit 8ff1a35

File tree

4 files changed

+10
-20
lines changed

4 files changed

+10
-20
lines changed

adapters/api/segment.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,27 @@ export async function sendSegmentEvent(action, body) {
1010
authorization: `Bearer ${ATLAN_API_TOKEN}`,
1111
"content-type": "application/json",
1212
};
13-
console.log("MyHeaders :", myHeaders);
13+
1414
const requestOptions = {
1515
method: "POST",
1616
headers: myHeaders,
1717
body: body,
1818
};
19-
console.log("requestOptions :", requestOptions);
19+
2020
var response = null;
21-
console.log("IS_DEV", IS_DEV);
21+
2222
if (!IS_DEV) {
2323
response = await fetch(
2424
`${ATLAN_INSTANCE_URL}/api/service/segment/track`,
2525
requestOptions
2626
)
2727
.then((resp) => {
28-
console.log("Inside then", resp);
2928
console.log("send segment event", action, body);
3029
})
3130
.catch((err) => {
32-
console.log("Catch err", err);
3331
console.log("couldn't send segment event", err);
3432
});
3533
} else {
36-
console.log("Wuttt");
3734
console.log("send segment event", action, body);
3835
}
3936

adapters/integrations/github-integration.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ export default class GitHubIntegration extends IntegrationInterface {
7777
}
7878

7979
if (total_assets !== 0) {
80-
console.log("Checking");
8180
await this.sendSegmentEventOfIntegration({
8281
action: "dbt_ci_action_run",
8382
properties: {
@@ -863,7 +862,7 @@ ${content}`;
863862
headSHA,
864863
"createIssueComment"
865864
);
866-
console.log(content);
865+
867866
return content;
868867
}
869868

adapters/integrations/gitlab-integration.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -649,8 +649,7 @@ ${content}`;
649649
domain,
650650
},
651651
});
652-
console.log("Action :", action);
653-
console.log("raw", raw);
652+
654653
return sendSegmentEvent(action, raw);
655654
} catch (error) {
656655
logger.withError(

dist/index.js

+5-10
Original file line numberDiff line numberDiff line change
@@ -25379,30 +25379,27 @@ async function sendSegmentEvent(action, body) {
2537925379
authorization: `Bearer ${ATLAN_API_TOKEN}`,
2538025380
"content-type": "application/json",
2538125381
};
25382-
console.log("MyHeaders :", myHeaders);
25382+
2538325383
const requestOptions = {
2538425384
method: "POST",
2538525385
headers: myHeaders,
2538625386
body: body,
2538725387
};
25388-
console.log("requestOptions :", requestOptions);
25388+
2538925389
var response = null;
25390-
console.log("IS_DEV", IS_DEV);
25390+
2539125391
if (!IS_DEV) {
2539225392
response = await src_fetch(
2539325393
`${ATLAN_INSTANCE_URL}/api/service/segment/track`,
2539425394
requestOptions
2539525395
)
2539625396
.then((resp) => {
25397-
console.log("Inside then", resp);
2539825397
console.log("send segment event", action, body);
2539925398
})
2540025399
.catch((err) => {
25401-
console.log("Catch err", err);
2540225400
console.log("couldn't send segment event", err);
2540325401
});
2540425402
} else {
25405-
console.log("Wuttt");
2540625403
console.log("send segment event", action, body);
2540725404
}
2540825405

@@ -25576,7 +25573,6 @@ class GitHubIntegration extends IntegrationInterface {
2557625573
}
2557725574

2557825575
if (total_assets !== 0) {
25579-
console.log("Checking");
2558025576
await this.sendSegmentEventOfIntegration({
2558125577
action: "dbt_ci_action_run",
2558225578
properties: {
@@ -26362,7 +26358,7 @@ ${content}`;
2636226358
headSHA,
2636326359
"createIssueComment"
2636426360
);
26365-
console.log(content);
26361+
2636626362
return content;
2636726363
}
2636826364

@@ -34677,8 +34673,7 @@ ${content}`;
3467734673
domain,
3467834674
},
3467934675
});
34680-
console.log("Action :", action);
34681-
console.log("raw", raw);
34676+
3468234677
return sendSegmentEvent(action, raw);
3468334678
} catch (error) {
3468434679
logger_logger.withError(

0 commit comments

Comments
 (0)