plugin-git-manager 1.2.27 → 1.3.1
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/README.md +151 -108
- package/client-v2.d.ts +2 -2
- package/client-v2.js +1 -1
- package/client.d.ts +3 -3
- package/client.js +1 -1
- package/dist/client/{326.90c276058682b536.js → 313.d38fc1d40c4589b9.js} +1 -1
- package/dist/client/941.1793e67472872992.js +10 -0
- package/dist/client/index.js +1 -1
- package/dist/client-v2/156.445366026c1cc9a8.js +10 -0
- package/dist/client-v2/{326.42b7b53651ffab3a.js → 313.3c867179c3a1e817.js} +1 -1
- package/dist/client-v2/434.19c7579c06b9077c.js +10 -0
- package/dist/client-v2/928.bba701b5a1ece58e.js +10 -0
- package/dist/client-v2/941.b0d55429cd053f32.js +10 -0
- package/dist/client-v2/index.js +1 -1
- package/dist/externalVersion.js +9 -8
- package/dist/locale/en-US.json +396 -297
- package/dist/locale/vi-VN.json +384 -292
- package/dist/locale/zh-CN.json +150 -51
- package/dist/node_modules/simple-git/dist/cjs/index.js +25 -25
- package/dist/node_modules/simple-git/package.json +1 -1
- package/dist/node_modules/zod/index.cjs +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/actions/git-actions.js +90 -36
- package/dist/server/actions/gitlab-api.js +4 -2
- package/dist/server/actions/poller.js +5 -2
- package/dist/server/actions/review-cutover.js +137 -0
- package/dist/server/actions/review.js +150 -51
- package/dist/server/actions/role-permissions.js +1 -0
- package/dist/server/ai-tools.js +8 -9
- package/dist/server/collections/gitCodeReviews.js +10 -0
- package/dist/server/collections/gitReviewCutover.js +44 -0
- package/dist/server/collections/gitReviewFlows.js +3 -0
- package/dist/server/collections/gitReviewInbox.js +51 -0
- package/dist/server/collections/gitReviewProjects.js +43 -0
- package/dist/server/collections/gitReviewRequests.js +56 -0
- package/dist/server/index.js +8 -2
- package/dist/server/plugin.js +57 -20
- package/dist/server/poller.js +95 -74
- package/dist/server/repository-access.js +23 -5
- package/dist/server/request-method-policy.js +76 -0
- package/dist/server/review-control-access.js +79 -0
- package/dist/server/services/legacy-post-service.js +412 -0
- package/dist/server/services/registry-content-service.js +4 -3
- package/dist/server/services/review-service.js +1451 -0
- package/dist/server/services/review-source.js +325 -0
- package/dist/server/utils/get-repo-account.js +3 -2
- package/dist/server/utils/url-security.js +24 -0
- package/package.json +61 -43
- package/server.d.ts +2 -2
- package/server.js +1 -1
- package/src/client/__tests__/CommitHistory.test.tsx +79 -0
- package/src/client/__tests__/ReviewHistory.test.tsx +126 -0
- package/src/client/__tests__/RunReviewButton.test.tsx +84 -0
- package/src/client/__tests__/workflowRoutes.test.ts +65 -0
- package/src/client/ai-context.tsx +114 -114
- package/src/client/components/AIEmployeeSelect.tsx +63 -63
- package/src/client/components/CommitHistory.tsx +429 -374
- package/src/client/components/FileExplorer.tsx +386 -386
- package/src/client/components/GitAccounts.tsx +179 -179
- package/src/client/components/GitManagerSettings.tsx +160 -160
- package/src/client/components/GitOperations.tsx +220 -220
- package/src/client/components/LLMModelSelect.tsx +63 -63
- package/src/client/components/LLMServiceSelect.tsx +58 -58
- package/src/client/components/MarkdownView.tsx +80 -80
- package/src/client/components/MergeRequests.tsx +790 -790
- package/src/client/components/PollingStatus.tsx +225 -225
- package/src/client/components/RepositoryConfig.tsx +335 -335
- package/src/client/components/RepositoryPermissions.tsx +123 -123
- package/src/client/components/ReviewFlows.tsx +352 -303
- package/src/client/components/ReviewHistory.tsx +796 -566
- package/src/client/components/RunReviewButton.tsx +57 -173
- package/src/client/context/GitManagerContext.tsx +92 -92
- package/src/client/index.tsx +91 -82
- package/src/client/locale.ts +9 -9
- package/src/client/promptTemplates.ts +31 -31
- package/src/client/workflowRoutes.ts +42 -0
- package/src/client-v2/ai-context.tsx +99 -0
- package/src/client-v2/components/SubtreeSplits.tsx +547 -547
- package/src/client-v2/index.tsx +1 -1
- package/src/client-v2/locale.ts +8 -8
- package/src/client-v2/plugin.tsx +67 -39
- package/src/index.ts +2 -2
- package/src/locale/en-US.json +396 -297
- package/src/locale/vi-VN.json +384 -292
- package/src/locale/zh-CN.json +150 -51
- package/src/server/__tests__/git-actions.test.ts +24 -24
- package/src/server/__tests__/git-security.test.ts +170 -0
- package/src/server/__tests__/plugin-url-security.test.ts +17 -17
- package/src/server/__tests__/poller-lifecycle.test.ts +71 -0
- package/src/server/__tests__/poller.test.ts +37 -37
- package/src/server/__tests__/repository-access.test.ts +760 -752
- package/src/server/__tests__/review-service.integration.test.ts +1263 -0
- package/src/server/__tests__/review.test.ts +76 -137
- package/src/server/__tests__/role-permissions.test.ts +147 -147
- package/src/server/__tests__/smoke.test.ts +139 -17
- package/src/server/__tests__/subtree.test.ts +85 -85
- package/src/server/actions/git-actions.ts +540 -480
- package/src/server/actions/gitlab-api.ts +422 -411
- package/src/server/actions/poller.ts +39 -27
- package/src/server/actions/review-cutover.ts +121 -0
- package/src/server/actions/review.ts +1498 -1369
- package/src/server/actions/role-permissions.ts +331 -321
- package/src/server/actions/subtree.ts +508 -508
- package/src/server/ai-tools.ts +334 -319
- package/src/server/collections/gitAccounts.ts +56 -56
- package/src/server/collections/gitCodeReviews.ts +218 -199
- package/src/server/collections/gitRepositories.ts +87 -87
- package/src/server/collections/gitReviewCutover.ts +23 -0
- package/src/server/collections/gitReviewFlows.ts +120 -108
- package/src/server/collections/gitReviewInbox.ts +30 -0
- package/src/server/collections/gitReviewProjects.ts +22 -0
- package/src/server/collections/gitReviewRequests.ts +35 -0
- package/src/server/collections/gitSubtreeConfigs.ts +38 -38
- package/src/server/collections/gitSubtreeRuns.ts +30 -30
- package/src/server/index.ts +14 -2
- package/src/server/migrations/20260508000000-add-auto-review-flow-id.ts +29 -29
- package/src/server/migrations/20260712000000-add-git-accounts.ts +198 -198
- package/src/server/migrations/20260730000000-migrate-legacy-repository-permissions.ts +81 -81
- package/src/server/plugin.ts +409 -361
- package/src/server/poller.ts +365 -352
- package/src/server/repository-access.ts +803 -773
- package/src/server/request-method-policy.ts +56 -0
- package/src/server/review-control-access.ts +71 -0
- package/src/server/services/__tests__/registry-content-service.test.ts +359 -345
- package/src/server/services/__tests__/review-source.test.ts +226 -0
- package/src/server/services/legacy-post-service.ts +550 -0
- package/src/server/services/registry-content-service.ts +495 -484
- package/src/server/services/review-service.ts +1899 -0
- package/src/server/services/review-source.ts +359 -0
- package/src/server/utils/__tests__/redact.test.ts +56 -56
- package/src/server/utils/__tests__/url-security.test.ts +85 -85
- package/src/server/utils/get-repo-account.ts +51 -41
- package/src/server/utils/gitlab-url.ts +38 -38
- package/src/server/utils/redact.ts +87 -87
- package/src/server/utils/url-security.ts +128 -95
- package/dist/client/900.acf7d1fa22f95e71.js +0 -10
- package/dist/client-v2/434.7a27051db18526c0.js +0 -10
- package/dist/client-v2/900.f32b9dc85249fc0a.js +0 -10
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
import { defineCollection } from '@nocobase/database';
|
|
2
|
-
|
|
3
|
-
export default defineCollection({
|
|
4
|
-
name: 'gitRepositories',
|
|
5
|
-
title: 'Git Repositories',
|
|
6
|
-
autoGenId: true,
|
|
7
|
-
createdAt: true,
|
|
8
|
-
updatedAt: true,
|
|
9
|
-
fields: [
|
|
10
|
-
{
|
|
11
|
-
type: 'string',
|
|
12
|
-
name: 'name',
|
|
13
|
-
interface: 'input',
|
|
14
|
-
uiSchema: { title: 'Repository Name', type: 'string', 'x-component': 'Input' },
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
type: 'string',
|
|
18
|
-
name: 'repoUrl',
|
|
19
|
-
interface: 'input',
|
|
20
|
-
uiSchema: { title: 'Repository URL', type: 'string', 'x-component': 'Input' },
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
type: 'belongsTo',
|
|
24
|
-
name: 'gitAccount',
|
|
25
|
-
target: 'gitAccounts',
|
|
26
|
-
foreignKey: 'gitAccountId',
|
|
27
|
-
onDelete: 'RESTRICT',
|
|
28
|
-
interface: 'm2o',
|
|
29
|
-
uiSchema: {
|
|
30
|
-
title: 'Git Account',
|
|
31
|
-
'x-component': 'AssociationField',
|
|
32
|
-
'x-component-props': { fieldNames: { label: 'name', value: 'id' } },
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
type: 'string',
|
|
37
|
-
name: 'localPath',
|
|
38
|
-
interface: 'input',
|
|
39
|
-
uiSchema: { title: 'Local Path', type: 'string', 'x-component': 'Input' },
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
type: 'string',
|
|
43
|
-
name: 'defaultBranch',
|
|
44
|
-
defaultValue: 'main',
|
|
45
|
-
interface: 'input',
|
|
46
|
-
uiSchema: { title: 'Default Branch', type: 'string', 'x-component': 'Input' },
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
type: 'string',
|
|
50
|
-
name: 'status',
|
|
51
|
-
defaultValue: 'disconnected',
|
|
52
|
-
interface: 'input',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
type: 'boolean',
|
|
56
|
-
name: 'autoReview',
|
|
57
|
-
defaultValue: false,
|
|
58
|
-
interface: 'checkbox',
|
|
59
|
-
uiSchema: { title: 'Auto Review', type: 'boolean', 'x-component': 'Checkbox' },
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
type: 'boolean',
|
|
63
|
-
name: 'registryExportEnabled',
|
|
64
|
-
allowNull: false,
|
|
65
|
-
defaultValue: false,
|
|
66
|
-
interface: 'checkbox',
|
|
67
|
-
uiSchema: { title: 'Allow Skill Registry export', type: 'boolean', 'x-component': 'Checkbox' },
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
type: 'belongsTo',
|
|
71
|
-
name: 'autoReviewFlow',
|
|
72
|
-
target: 'gitReviewFlows',
|
|
73
|
-
foreignKey: 'autoReviewFlowId',
|
|
74
|
-
interface: 'm2o',
|
|
75
|
-
uiSchema: {
|
|
76
|
-
title: 'Primary Auto Review Flow',
|
|
77
|
-
'x-component': 'AssociationField',
|
|
78
|
-
'x-component-props': { fieldNames: { label: 'name', value: 'id' } },
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
type: 'date',
|
|
83
|
-
name: 'lastPolledAt',
|
|
84
|
-
interface: 'datetime',
|
|
85
|
-
},
|
|
86
|
-
],
|
|
87
|
-
});
|
|
1
|
+
import { defineCollection } from '@nocobase/database';
|
|
2
|
+
|
|
3
|
+
export default defineCollection({
|
|
4
|
+
name: 'gitRepositories',
|
|
5
|
+
title: 'Git Repositories',
|
|
6
|
+
autoGenId: true,
|
|
7
|
+
createdAt: true,
|
|
8
|
+
updatedAt: true,
|
|
9
|
+
fields: [
|
|
10
|
+
{
|
|
11
|
+
type: 'string',
|
|
12
|
+
name: 'name',
|
|
13
|
+
interface: 'input',
|
|
14
|
+
uiSchema: { title: 'Repository Name', type: 'string', 'x-component': 'Input' },
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
type: 'string',
|
|
18
|
+
name: 'repoUrl',
|
|
19
|
+
interface: 'input',
|
|
20
|
+
uiSchema: { title: 'Repository URL', type: 'string', 'x-component': 'Input' },
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
type: 'belongsTo',
|
|
24
|
+
name: 'gitAccount',
|
|
25
|
+
target: 'gitAccounts',
|
|
26
|
+
foreignKey: 'gitAccountId',
|
|
27
|
+
onDelete: 'RESTRICT',
|
|
28
|
+
interface: 'm2o',
|
|
29
|
+
uiSchema: {
|
|
30
|
+
title: 'Git Account',
|
|
31
|
+
'x-component': 'AssociationField',
|
|
32
|
+
'x-component-props': { fieldNames: { label: 'name', value: 'id' } },
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: 'string',
|
|
37
|
+
name: 'localPath',
|
|
38
|
+
interface: 'input',
|
|
39
|
+
uiSchema: { title: 'Local Path', type: 'string', 'x-component': 'Input' },
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: 'string',
|
|
43
|
+
name: 'defaultBranch',
|
|
44
|
+
defaultValue: 'main',
|
|
45
|
+
interface: 'input',
|
|
46
|
+
uiSchema: { title: 'Default Branch', type: 'string', 'x-component': 'Input' },
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: 'string',
|
|
50
|
+
name: 'status',
|
|
51
|
+
defaultValue: 'disconnected',
|
|
52
|
+
interface: 'input',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
type: 'boolean',
|
|
56
|
+
name: 'autoReview',
|
|
57
|
+
defaultValue: false,
|
|
58
|
+
interface: 'checkbox',
|
|
59
|
+
uiSchema: { title: 'Auto Review', type: 'boolean', 'x-component': 'Checkbox' },
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: 'boolean',
|
|
63
|
+
name: 'registryExportEnabled',
|
|
64
|
+
allowNull: false,
|
|
65
|
+
defaultValue: false,
|
|
66
|
+
interface: 'checkbox',
|
|
67
|
+
uiSchema: { title: 'Allow Skill Registry export', type: 'boolean', 'x-component': 'Checkbox' },
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: 'belongsTo',
|
|
71
|
+
name: 'autoReviewFlow',
|
|
72
|
+
target: 'gitReviewFlows',
|
|
73
|
+
foreignKey: 'autoReviewFlowId',
|
|
74
|
+
interface: 'm2o',
|
|
75
|
+
uiSchema: {
|
|
76
|
+
title: 'Primary Auto Review Flow',
|
|
77
|
+
'x-component': 'AssociationField',
|
|
78
|
+
'x-component-props': { fieldNames: { label: 'name', value: 'id' } },
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
type: 'date',
|
|
83
|
+
name: 'lastPolledAt',
|
|
84
|
+
interface: 'datetime',
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { defineCollection } from '@nocobase/database';
|
|
11
|
+
|
|
12
|
+
export default defineCollection({
|
|
13
|
+
name: 'gitReviewCutover',
|
|
14
|
+
autoGenId: true,
|
|
15
|
+
createdAt: true,
|
|
16
|
+
updatedAt: true,
|
|
17
|
+
fields: [
|
|
18
|
+
{ name: 'key', type: 'string', unique: true, allowNull: false },
|
|
19
|
+
{ name: 'state', type: 'string', allowNull: false },
|
|
20
|
+
{ name: 'confirmedBy', type: 'string' },
|
|
21
|
+
{ name: 'confirmedAt', type: 'date' },
|
|
22
|
+
],
|
|
23
|
+
});
|
|
@@ -1,108 +1,120 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
type: '
|
|
32
|
-
name: '
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
type: 'string',
|
|
67
|
-
name: '
|
|
68
|
-
interface: 'input',
|
|
69
|
-
uiSchema: { title: '
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
type: 'string',
|
|
73
|
-
name: '
|
|
74
|
-
interface: 'input',
|
|
75
|
-
uiSchema: {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { defineCollection } from '@nocobase/database';
|
|
11
|
+
|
|
12
|
+
export default defineCollection({
|
|
13
|
+
name: 'gitReviewFlows',
|
|
14
|
+
title: 'Git Review Flows',
|
|
15
|
+
autoGenId: true,
|
|
16
|
+
createdBy: true,
|
|
17
|
+
updatedBy: true,
|
|
18
|
+
createdAt: true,
|
|
19
|
+
updatedAt: true,
|
|
20
|
+
fields: [
|
|
21
|
+
{ type: 'bigInt', name: 'workflowId' },
|
|
22
|
+
{ type: 'string', name: 'workflowKey' },
|
|
23
|
+
{ type: 'boolean', name: 'reviewOnNewCommits', defaultValue: false },
|
|
24
|
+
{
|
|
25
|
+
type: 'string',
|
|
26
|
+
name: 'name',
|
|
27
|
+
interface: 'input',
|
|
28
|
+
uiSchema: { title: 'Flow Name', type: 'string', 'x-component': 'Input', required: true },
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: 'belongsTo',
|
|
32
|
+
name: 'repository',
|
|
33
|
+
target: 'gitRepositories',
|
|
34
|
+
foreignKey: 'repositoryId',
|
|
35
|
+
interface: 'm2o',
|
|
36
|
+
uiSchema: {
|
|
37
|
+
title: 'Repository',
|
|
38
|
+
'x-component': 'AssociationField',
|
|
39
|
+
'x-component-props': { fieldNames: { label: 'name', value: 'id' } },
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: 'boolean',
|
|
44
|
+
name: 'enabled',
|
|
45
|
+
defaultValue: true,
|
|
46
|
+
interface: 'checkbox',
|
|
47
|
+
uiSchema: { title: 'Enabled', type: 'boolean', 'x-component': 'Checkbox' },
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: 'string',
|
|
51
|
+
name: 'triggerMode',
|
|
52
|
+
defaultValue: 'manual',
|
|
53
|
+
interface: 'select',
|
|
54
|
+
uiSchema: {
|
|
55
|
+
title: 'Trigger Mode',
|
|
56
|
+
type: 'string',
|
|
57
|
+
'x-component': 'Select',
|
|
58
|
+
enum: [
|
|
59
|
+
{ value: 'manual', label: 'Manual' },
|
|
60
|
+
{ value: 'onMergeRequestCreated', label: 'On Merge Request Created' },
|
|
61
|
+
{ value: 'both', label: 'Both' },
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: 'string',
|
|
67
|
+
name: 'aiEmployeeUsername',
|
|
68
|
+
interface: 'input',
|
|
69
|
+
uiSchema: { title: 'AI Employee', type: 'string', 'x-component': 'Input' },
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
type: 'string',
|
|
73
|
+
name: 'llmService',
|
|
74
|
+
interface: 'input',
|
|
75
|
+
uiSchema: { title: 'LLM Service (optional)', type: 'string', 'x-component': 'Input' },
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
type: 'string',
|
|
79
|
+
name: 'model',
|
|
80
|
+
interface: 'input',
|
|
81
|
+
uiSchema: { title: 'Model (optional)', type: 'string', 'x-component': 'Input' },
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'string',
|
|
85
|
+
name: 'branchFilter',
|
|
86
|
+
interface: 'input',
|
|
87
|
+
uiSchema: {
|
|
88
|
+
title: 'Branch Filter (regex, optional)',
|
|
89
|
+
type: 'string',
|
|
90
|
+
'x-component': 'Input',
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: 'string',
|
|
95
|
+
name: 'postMode',
|
|
96
|
+
defaultValue: 'manual',
|
|
97
|
+
interface: 'select',
|
|
98
|
+
uiSchema: {
|
|
99
|
+
title: 'Post Mode',
|
|
100
|
+
type: 'string',
|
|
101
|
+
'x-component': 'Select',
|
|
102
|
+
enum: [
|
|
103
|
+
{ value: 'auto', label: 'Auto' },
|
|
104
|
+
{ value: 'manual', label: 'Manual (require approval)' },
|
|
105
|
+
{ value: 'disabled', label: 'Disabled' },
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
type: 'text',
|
|
111
|
+
name: 'instructions',
|
|
112
|
+
interface: 'textarea',
|
|
113
|
+
uiSchema: {
|
|
114
|
+
title: 'Additional Instructions',
|
|
115
|
+
type: 'string',
|
|
116
|
+
'x-component': 'Input.TextArea',
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { defineCollection } from '@nocobase/database';
|
|
11
|
+
|
|
12
|
+
export default defineCollection({
|
|
13
|
+
name: 'gitReviewInbox',
|
|
14
|
+
autoGenId: true,
|
|
15
|
+
createdAt: true,
|
|
16
|
+
updatedAt: true,
|
|
17
|
+
fields: [
|
|
18
|
+
{ name: 'projectKey', type: 'string', allowNull: false, index: true },
|
|
19
|
+
{ name: 'repositoryId', type: 'integer', allowNull: false },
|
|
20
|
+
{ name: 'reviewId', type: 'integer', allowNull: false, unique: true },
|
|
21
|
+
{ name: 'legacyReviewId', type: 'integer', unique: true },
|
|
22
|
+
{ name: 'eventKey', type: 'string', unique: true },
|
|
23
|
+
{ name: 'queuedAt', type: 'date', allowNull: false },
|
|
24
|
+
{ name: 'recoveredBy', type: 'string' },
|
|
25
|
+
{ name: 'recoveredAt', type: 'date' },
|
|
26
|
+
{ name: 'state', type: 'string', allowNull: false, defaultValue: 'queued' },
|
|
27
|
+
{ name: 'blockedReason', type: 'string' },
|
|
28
|
+
{ name: 'payload', type: 'json', allowNull: false },
|
|
29
|
+
],
|
|
30
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { defineCollection } from '@nocobase/database';
|
|
11
|
+
|
|
12
|
+
export default defineCollection({
|
|
13
|
+
name: 'gitReviewProjects',
|
|
14
|
+
autoGenId: true,
|
|
15
|
+
createdAt: true,
|
|
16
|
+
updatedAt: true,
|
|
17
|
+
fields: [
|
|
18
|
+
{ name: 'projectKey', type: 'string', unique: true, allowNull: false },
|
|
19
|
+
{ name: 'activeInboxId', type: 'integer' },
|
|
20
|
+
{ name: 'legacyPostReviewId', type: 'integer' },
|
|
21
|
+
],
|
|
22
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { defineCollection } from '@nocobase/database';
|
|
11
|
+
|
|
12
|
+
export default defineCollection({
|
|
13
|
+
name: 'gitReviewRequests',
|
|
14
|
+
autoGenId: true,
|
|
15
|
+
createdAt: true,
|
|
16
|
+
updatedAt: true,
|
|
17
|
+
fields: [
|
|
18
|
+
{ name: 'inboxId', type: 'integer', allowNull: false, unique: true },
|
|
19
|
+
{ name: 'reviewId', type: 'integer', allowNull: false },
|
|
20
|
+
{ name: 'repositoryId', type: 'integer', allowNull: false },
|
|
21
|
+
{ name: 'flowId', type: 'integer', allowNull: false },
|
|
22
|
+
{ name: 'workflowId', type: 'bigInt', allowNull: false },
|
|
23
|
+
{ name: 'workflowKey', type: 'string' },
|
|
24
|
+
{ name: 'eventType', type: 'string', allowNull: false },
|
|
25
|
+
{ name: 'executionId', type: 'bigInt', unique: true },
|
|
26
|
+
{ name: 'fenced', type: 'boolean', allowNull: false, defaultValue: false },
|
|
27
|
+
{ name: 'llmClaims', type: 'json' },
|
|
28
|
+
{ name: 'resultFingerprint', type: 'string' },
|
|
29
|
+
{ name: 'postClaim', type: 'string' },
|
|
30
|
+
{ name: 'postClaimedAt', type: 'date' },
|
|
31
|
+
{ name: 'postResetBy', type: 'string' },
|
|
32
|
+
{ name: 'postResetAt', type: 'date' },
|
|
33
|
+
{ name: 'aiSettled', type: 'boolean', allowNull: false, defaultValue: false },
|
|
34
|
+
],
|
|
35
|
+
});
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { defineCollection } from '@nocobase/database';
|
|
2
|
-
|
|
3
|
-
export default defineCollection({
|
|
4
|
-
name: 'gitSubtreeConfigs',
|
|
5
|
-
title: 'Git Subtree Configurations',
|
|
6
|
-
autoGenId: true,
|
|
7
|
-
createdAt: true,
|
|
8
|
-
updatedAt: true,
|
|
9
|
-
fields: [
|
|
10
|
-
{ type: 'string', name: 'name', allowNull: false },
|
|
11
|
-
{
|
|
12
|
-
type: 'belongsTo',
|
|
13
|
-
name: 'repository',
|
|
14
|
-
target: 'gitRepositories',
|
|
15
|
-
foreignKey: 'repositoryId',
|
|
16
|
-
onDelete: 'CASCADE',
|
|
17
|
-
},
|
|
18
|
-
{ type: 'string', name: 'sourceBranch', allowNull: false },
|
|
19
|
-
{ type: 'string', name: 'sourcePrefix', allowNull: false },
|
|
20
|
-
{ type: 'json', name: 'sourcePrefixes' },
|
|
21
|
-
{ type: 'string', name: 'targetBranch', allowNull: false },
|
|
22
|
-
{ type: 'string', name: 'remoteName', allowNull: false, defaultValue: 'origin' },
|
|
23
|
-
{ type: 'string', name: 'defaultPolicy', allowNull: false, defaultValue: 'fastForward' },
|
|
24
|
-
{ type: 'boolean', name: 'pushAfterRun', allowNull: false, defaultValue: true },
|
|
25
|
-
{ type: 'boolean', name: 'enabled', allowNull: false, defaultValue: true },
|
|
26
|
-
{ type: 'date', name: 'lastRunAt' },
|
|
27
|
-
{ type: 'string', name: 'lastSplitSha' },
|
|
28
|
-
{ type: 'string', name: 'lastStatus' },
|
|
29
|
-
{ type: 'text', name: 'lastError' },
|
|
30
|
-
{
|
|
31
|
-
type: 'hasMany',
|
|
32
|
-
name: 'runs',
|
|
33
|
-
target: 'gitSubtreeRuns',
|
|
34
|
-
foreignKey: 'configId',
|
|
35
|
-
onDelete: 'CASCADE',
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
});
|
|
1
|
+
import { defineCollection } from '@nocobase/database';
|
|
2
|
+
|
|
3
|
+
export default defineCollection({
|
|
4
|
+
name: 'gitSubtreeConfigs',
|
|
5
|
+
title: 'Git Subtree Configurations',
|
|
6
|
+
autoGenId: true,
|
|
7
|
+
createdAt: true,
|
|
8
|
+
updatedAt: true,
|
|
9
|
+
fields: [
|
|
10
|
+
{ type: 'string', name: 'name', allowNull: false },
|
|
11
|
+
{
|
|
12
|
+
type: 'belongsTo',
|
|
13
|
+
name: 'repository',
|
|
14
|
+
target: 'gitRepositories',
|
|
15
|
+
foreignKey: 'repositoryId',
|
|
16
|
+
onDelete: 'CASCADE',
|
|
17
|
+
},
|
|
18
|
+
{ type: 'string', name: 'sourceBranch', allowNull: false },
|
|
19
|
+
{ type: 'string', name: 'sourcePrefix', allowNull: false },
|
|
20
|
+
{ type: 'json', name: 'sourcePrefixes' },
|
|
21
|
+
{ type: 'string', name: 'targetBranch', allowNull: false },
|
|
22
|
+
{ type: 'string', name: 'remoteName', allowNull: false, defaultValue: 'origin' },
|
|
23
|
+
{ type: 'string', name: 'defaultPolicy', allowNull: false, defaultValue: 'fastForward' },
|
|
24
|
+
{ type: 'boolean', name: 'pushAfterRun', allowNull: false, defaultValue: true },
|
|
25
|
+
{ type: 'boolean', name: 'enabled', allowNull: false, defaultValue: true },
|
|
26
|
+
{ type: 'date', name: 'lastRunAt' },
|
|
27
|
+
{ type: 'string', name: 'lastSplitSha' },
|
|
28
|
+
{ type: 'string', name: 'lastStatus' },
|
|
29
|
+
{ type: 'text', name: 'lastError' },
|
|
30
|
+
{
|
|
31
|
+
type: 'hasMany',
|
|
32
|
+
name: 'runs',
|
|
33
|
+
target: 'gitSubtreeRuns',
|
|
34
|
+
foreignKey: 'configId',
|
|
35
|
+
onDelete: 'CASCADE',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
});
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineCollection } from '@nocobase/database';
|
|
2
|
-
|
|
3
|
-
export default defineCollection({
|
|
4
|
-
name: 'gitSubtreeRuns',
|
|
5
|
-
title: 'Git Subtree Runs',
|
|
6
|
-
autoGenId: true,
|
|
7
|
-
createdAt: true,
|
|
8
|
-
updatedAt: true,
|
|
9
|
-
fields: [
|
|
10
|
-
{
|
|
11
|
-
type: 'belongsTo',
|
|
12
|
-
name: 'config',
|
|
13
|
-
target: 'gitSubtreeConfigs',
|
|
14
|
-
foreignKey: 'configId',
|
|
15
|
-
onDelete: 'CASCADE',
|
|
16
|
-
},
|
|
17
|
-
{ type: 'string', name: 'policy', allowNull: false },
|
|
18
|
-
{ type: 'string', name: 'executionMode', allowNull: false, defaultValue: 'app' },
|
|
19
|
-
{ type: 'string', name: 'sourceSha' },
|
|
20
|
-
{ type: 'string', name: 'splitSha' },
|
|
21
|
-
{ type: 'string', name: 'targetBeforeSha' },
|
|
22
|
-
{ type: 'string', name: 'targetAfterSha' },
|
|
23
|
-
{ type: 'string', name: 'status', allowNull: false, defaultValue: 'running' },
|
|
24
|
-
{ type: 'date', name: 'startedAt', allowNull: false },
|
|
25
|
-
{ type: 'date', name: 'finishedAt' },
|
|
26
|
-
{ type: 'text', name: 'output' },
|
|
27
|
-
{ type: 'text', name: 'error' },
|
|
28
|
-
{ type: 'bigInt', name: 'triggeredById' },
|
|
29
|
-
],
|
|
30
|
-
});
|
|
1
|
+
import { defineCollection } from '@nocobase/database';
|
|
2
|
+
|
|
3
|
+
export default defineCollection({
|
|
4
|
+
name: 'gitSubtreeRuns',
|
|
5
|
+
title: 'Git Subtree Runs',
|
|
6
|
+
autoGenId: true,
|
|
7
|
+
createdAt: true,
|
|
8
|
+
updatedAt: true,
|
|
9
|
+
fields: [
|
|
10
|
+
{
|
|
11
|
+
type: 'belongsTo',
|
|
12
|
+
name: 'config',
|
|
13
|
+
target: 'gitSubtreeConfigs',
|
|
14
|
+
foreignKey: 'configId',
|
|
15
|
+
onDelete: 'CASCADE',
|
|
16
|
+
},
|
|
17
|
+
{ type: 'string', name: 'policy', allowNull: false },
|
|
18
|
+
{ type: 'string', name: 'executionMode', allowNull: false, defaultValue: 'app' },
|
|
19
|
+
{ type: 'string', name: 'sourceSha' },
|
|
20
|
+
{ type: 'string', name: 'splitSha' },
|
|
21
|
+
{ type: 'string', name: 'targetBeforeSha' },
|
|
22
|
+
{ type: 'string', name: 'targetAfterSha' },
|
|
23
|
+
{ type: 'string', name: 'status', allowNull: false, defaultValue: 'running' },
|
|
24
|
+
{ type: 'date', name: 'startedAt', allowNull: false },
|
|
25
|
+
{ type: 'date', name: 'finishedAt' },
|
|
26
|
+
{ type: 'text', name: 'output' },
|
|
27
|
+
{ type: 'text', name: 'error' },
|
|
28
|
+
{ type: 'bigInt', name: 'triggeredById' },
|
|
29
|
+
],
|
|
30
|
+
});
|