fix: track events issue and env variables fixes (#2184)

* fix: track event fixes

* fix: adding env variables to trubo
This commit is contained in:
sriram veeraghanta 2023-09-14 16:05:31 +05:30 committed by GitHub
parent a53b428bbd
commit 6659cfc8b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 903 additions and 971 deletions

View file

@ -4,11 +4,6 @@ import { API_BASE_URL } from "helpers/common.helper";
import { ICurrentUserResponse, IGithubRepoInfo, IGithubServiceImportFormData } from "types";
const { NEXT_PUBLIC_API_BASE_URL } = process.env;
const trackEvent =
process.env.NEXT_PUBLIC_TRACK_EVENTS === "true" || process.env.NEXT_PUBLIC_TRACK_EVENTS === "1";
const integrationServiceType: string = "github";
class GithubIntegrationService extends APIService {
constructor() {
@ -48,8 +43,7 @@ class GithubIntegrationService extends APIService {
data
)
.then((response) => {
if (trackEvent)
trackEventServices.trackImporterEvent(response?.data, "GITHUB_IMPORTER_CREATE", user);
trackEventServices.trackImporterEvent(response?.data, "GITHUB_IMPORTER_CREATE", user);
return response?.data;
})
.catch((error) => {