Skip to content

Commit 08d2b65

Browse files
authored
Merge branch 'main' into fix/CM-1999
2 parents ed55301 + c6b9f4b commit 08d2b65

File tree

87 files changed

+16387
-5874
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+16387
-5874
lines changed

.husky/pre-commit

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ frontend_files=`git --no-pager diff --name-only --cached |
22
grep -E "frontend\/.+\.(?:js|ts|vue|scss|html)$" |
33
wc -l`
44

5-
backend_files=`git --no-pager diff --name-only --cached |
6-
grep -E "backend\/.+\.(?:js|ts|vue|scss|html)$" |
7-
wc -l`
5+
# backend_files=`git --no-pager diff --name-only --cached |
6+
# grep -E "backend\/.+\.(?:js|ts|vue|scss|html)$" |
7+
# wc -l`
88

99

1010
if [ $frontend_files -gt 0 ]
1111
then
1212
cd frontend && npx lint-staged && cd ..
1313
fi
1414

15-
if [ $backend_files -gt 0 ]
16-
then
17-
cd backend && npx lint-staged
18-
fi
15+
# if [ $backend_files -gt 0 ]
16+
# then
17+
# cd backend && npx lint-staged
18+
# fi

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,5 +169,5 @@
169169
"tsx": "^4.7.1",
170170
"typescript": "^5.6.3"
171171
},
172-
"packageManager": "pnpm@9.11.0+sha512.0a203ffaed5a3f63242cd064c8fb5892366c103e328079318f78062f24ea8c9d50bc6a47aa3567cabefd824d170e78fa2745ed1f16b132e16436146b7688f19b"
172+
"packageManager": "pnpm@9.15.0"
173173
}

backend/src/services/organizationService.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,9 @@ export default class OrganizationService extends LoggerBase {
845845

846846
return await this.findById(record.id)
847847
} catch (error) {
848-
await SequelizeRepository.rollbackTransaction(transaction)
848+
if (transaction) {
849+
await SequelizeRepository.rollbackTransaction(transaction)
850+
}
849851

850852
SequelizeRepository.handleUniqueFieldError(error, this.options.language, 'organization')
851853

frontend/package-lock.json

Lines changed: 11 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"axios": "^1.6.8",
5252
"chart.js": "^3.9.1",
5353
"chartjs-adapter-moment": "^1.0.1",
54-
"dayjs": "^1.11.12",
54+
"dayjs": "^1.11.13",
5555
"element-plus": "^2.3.1",
5656
"eslint-import-resolver-alias": "^1.1.2",
5757
"eslint-plugin-import": "^2.27.5",
@@ -60,7 +60,6 @@
6060
"logrocket": "^3.0.1",
6161
"logrocket-vuex": "^0.0.3",
6262
"marked": "^4.3.0",
63-
"moment": "^2.29.4",
6463
"node-emoji": "^1.11.0",
6564
"nprogress": "0.2.0",
6665
"papaparse": "^5.4.1",
@@ -101,14 +100,14 @@
101100
"concurrently": "^7.6.0",
102101
"css-minimizer-webpack-plugin": "^4.2.2",
103102
"cypress": "^13.7.3",
104-
"lint-staged": "^15.4.3",
105103
"cypress-mailosaur": "^2.13.0",
106104
"dotenv": "^16.0.3",
107105
"eslint": "^8.36.0",
108106
"eslint-import-resolver-typescript": "^3.6.1",
109107
"eslint-plugin-cypress": "^2.12.1",
110108
"eslint-plugin-storybook": "^0.6.15",
111109
"eslint-plugin-vue": "^9.10.0",
110+
"lint-staged": "^15.4.3",
112111
"mini-css-extract-plugin": "^2.7.5",
113112
"postcss": "^8.4.21",
114113
"rollup-plugin-visualizer": "^5.9.2",

frontend/src/config/charts/configs/dashboard.area.chart.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import moment from 'moment';
21
import { formatTooltipTitle, parseTooltipBody, parseTooltipTitle } from '@/utils/reports';
32
import { ChartConfig } from '@/config/charts';
43
import { externalTooltipHandler } from '@/config/charts/helpers/tooltip';
4+
import { dateHelper } from '@/shared/date-helper/date-helper';
55

66
interface DashboardAreaChartData {
77
value: number,
@@ -111,7 +111,7 @@ export const dashboardAreaChart: ChartConfig = (ctx: any, data: DashboardAreaCha
111111
family: 'Open Sans',
112112
size: 10,
113113
},
114-
callback: (label: string) => moment(label).format('MMM DD'),
114+
callback: (label: string) => dateHelper(label).format('MMM DD'),
115115
},
116116
grid: {
117117
display: false,

frontend/src/config/integrations/github-archive/components/settings/github-settings-add-repository-modal.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ import {
164164
} from '@/config/integrations/github-archive/types/GithubSettings';
165165
import { GithubApiService } from '@/config/integrations/github-archive/services/github.api.service';
166166
import Message from '@/shared/message/message';
167-
import dayjs from 'dayjs';
167+
import { dateHelper } from '@/shared/date-helper/date-helper';
168168
169169
const props = defineProps<{
170170
modelValue: boolean,
@@ -200,17 +200,17 @@ const isOrganizationSynced = (org: GitHubOrganization) => organizations.value.so
200200
201201
const addRepository = (repo: GitHubSettingsRepository) => {
202202
if (!repositories.value.some((r: GitHubSettingsRepository) => repo.url === r.url)) {
203-
repositories.value.push({ ...repo, updatedAt: dayjs().toISOString() });
203+
repositories.value.push({ ...repo, updatedAt: dateHelper().toISOString() });
204204
}
205205
};
206206
207207
const addOrganizations = (org: GitHubOrganization) => {
208-
organizations.value.push({ ...org, updatedAt: dayjs().toISOString() });
208+
organizations.value.push({ ...org, updatedAt: dateHelper().toISOString() });
209209
GithubApiService.getOrganizationRepositories(org.name)
210210
.then((res) => {
211211
const newRepositories = (res as GitHubSettingsRepository[])
212212
.filter((r: GitHubSettingsRepository) => !repositories.value.some((repo: GitHubSettingsRepository) => repo.url === r.url))
213-
.map((r: GitHubSettingsRepository) => ({ ...r, org, updatedAt: dayjs().toISOString() }));
213+
.map((r: GitHubSettingsRepository) => ({ ...r, org, updatedAt: dateHelper().toISOString() }));
214214
repositories.value = [...repositories.value, ...newRepositories];
215215
});
216216
};

frontend/src/config/integrations/github-archive/components/settings/github-settings-drawer.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ import {
8282
GitHubSettingsRepository,
8383
} from '@/config/integrations/github-archive/types/GithubSettings';
8484
import LfGithubSettingsMapping from '@/config/integrations/github-archive/components/settings/github-settings-mapping.vue';
85-
import dayjs from 'dayjs';
8685
import { IntegrationService } from '@/modules/integration/integration-service';
8786
import Message from '@/shared/message/message';
8887
import { mapActions } from '@/shared/vuex/vuex.helpers';
@@ -93,6 +92,7 @@ import {
9392
} from '@/shared/modules/monitoring/types/event';
9493
import { Platform } from '@/shared/modules/platform/types/Platform';
9594
import { showIntegrationProgressNotification } from '@/modules/integration/helpers/integration-progress-notification';
95+
import { dateHelper } from '@/shared/date-helper/date-helper';
9696
9797
const props = defineProps<{
9898
modelValue: boolean;
@@ -148,16 +148,16 @@ const buildSettings = (): GitHubSettings => {
148148
(o: GitHubOrganization): GitHubSettingsOrganization => ({
149149
...o,
150150
fullSync: organizations.value.some((org) => org.url === o.url),
151-
updatedAt: o.updatedAt || dayjs().toISOString(),
151+
updatedAt: o.updatedAt || dateHelper().toISOString(),
152152
repos: repositories.value
153153
.filter((r) => r.org!.url === o.url)
154154
.map((r) => ({
155155
name: r.name,
156156
url: r.url,
157157
updatedAt: (props.integration
158158
&& repoMappings.value[r.url] !== initialRepoMappings.value[r.url])
159-
? dayjs().toISOString()
160-
: r.updatedAt || dayjs().toISOString(),
159+
? dateHelper().toISOString()
160+
: r.updatedAt || dateHelper().toISOString(),
161161
})),
162162
}),
163163
);

frontend/src/config/integrations/github-archive/components/settings/github-settings-org-item.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ import LfBadge from '@/ui-kit/badge/Badge.vue';
7676
import { computed } from 'vue';
7777
import LfDropdown from '@/ui-kit/dropdown/Dropdown.vue';
7878
import LfDropdownItem from '@/ui-kit/dropdown/DropdownItem.vue';
79-
import dayjs from 'dayjs';
8079
import { GithubApiService } from '@/config/integrations/github-archive/services/github.api.service';
80+
import { dateHelper } from '@/shared/date-helper/date-helper';
8181
8282
const props = defineProps<{
8383
organizations: GitHubOrganization[];
@@ -101,12 +101,12 @@ const repos = computed<GitHubRepository[]>({
101101
const isSynced = computed(() => orgs.value.some((org) => org.url === props.organization.url));
102102
103103
const sync = () => {
104-
orgs.value.push({ ...props.organization, updatedAt: dayjs().toISOString() });
104+
orgs.value.push({ ...props.organization, updatedAt: dateHelper().toISOString() });
105105
GithubApiService.getOrganizationRepositories(props.organization.name)
106106
.then((res) => {
107107
const newRepositories = (res as GitHubSettingsRepository[])
108108
.filter((r: GitHubSettingsRepository) => !repos.value.some((repo: GitHubSettingsRepository) => repo.url === r.url))
109-
.map((r: GitHubSettingsRepository) => ({ ...r, org: props.organization, updatedAt: dayjs().toISOString() }));
109+
.map((r: GitHubSettingsRepository) => ({ ...r, org: props.organization, updatedAt: dateHelper().toISOString() }));
110110
repos.value = [...repos.value, ...newRepositories];
111111
});
112112
};

frontend/src/config/integrations/integrations.helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const useIntegrationsHelpers = () => {
77

88
return Object.values(lfIntegrations).map((config) => ({
99
...config,
10-
...findByPlatform(config.key),
10+
...(findByPlatform ? findByPlatform(config.key) : {}),
1111
}))
1212
.filter((integration) => integration.status);
1313
};

0 commit comments

Comments
 (0)