plugin-git-manager 1.3.3 → 1.4.0

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.
Files changed (44) hide show
  1. package/dist/client/{156.c27c2392746e7866.js → 156.8e36af3e2cee173e.js} +1 -1
  2. package/dist/client/{317.17ed0018e3e7db00.js → 317.2d0d33871e24ee24.js} +1 -1
  3. package/dist/client/{434.b2eeaaef33aae6e0.js → 434.2401f7257495b66e.js} +1 -1
  4. package/dist/client/{453.fc3042c9740d8fab.js → 453.58657b9ba0904477.js} +1 -1
  5. package/dist/client/index.js +1 -1
  6. package/dist/client-v2/{434.19c7579c06b9077c.js → 434.32b0a07b821b9329.js} +1 -1
  7. package/dist/client-v2/{453.5e507c94c59277b1.js → 453.f9a0ec6d8e1bd1cc.js} +1 -1
  8. package/dist/client-v2/index.js +1 -1
  9. package/dist/externalVersion.js +10 -9
  10. package/dist/locale/en-US.json +27 -1
  11. package/dist/locale/vi-VN.json +27 -1
  12. package/dist/locale/zh-CN.json +30 -1
  13. package/dist/node_modules/simple-git/package.json +1 -1
  14. package/dist/node_modules/zod/package.json +1 -1
  15. package/dist/server/actions/chat-context.js +282 -0
  16. package/dist/server/actions/git-actions.js +99 -4
  17. package/dist/server/actions/gitlab-api.js +86 -7
  18. package/dist/server/chat-context-admission.js +187 -0
  19. package/dist/server/plugin.js +8 -0
  20. package/dist/server/request-method-policy.js +2 -0
  21. package/package.json +2 -2
  22. package/src/client/__tests__/GitContextPicker.test.tsx +120 -0
  23. package/src/client/__tests__/ai-context.test.tsx +119 -0
  24. package/src/client/ai-context.tsx +3 -113
  25. package/src/client/context/GitManagerContext.tsx +18 -2
  26. package/src/client/index.tsx +3 -5
  27. package/src/client-v2/ai-context.tsx +135 -72
  28. package/src/client-v2/components/GitContextPicker.tsx +418 -0
  29. package/src/client-v2/git-context-api.ts +59 -0
  30. package/src/client-v2/plugin.tsx +2 -4
  31. package/src/locale/en-US.json +27 -1
  32. package/src/locale/vi-VN.json +27 -1
  33. package/src/locale/zh-CN.json +30 -1
  34. package/src/server/__tests__/chat-context-admission.test.ts +276 -0
  35. package/src/server/__tests__/chat-context-options.test.ts +144 -0
  36. package/src/server/__tests__/git-chat-context.test.ts +138 -0
  37. package/src/server/__tests__/git-security.test.ts +52 -0
  38. package/src/server/__tests__/smoke.test.ts +200 -0
  39. package/src/server/actions/chat-context.ts +302 -0
  40. package/src/server/actions/git-actions.ts +119 -6
  41. package/src/server/actions/gitlab-api.ts +97 -4
  42. package/src/server/chat-context-admission.ts +182 -0
  43. package/src/server/plugin.ts +11 -0
  44. package/src/server/request-method-policy.ts +2 -0
@@ -0,0 +1,138 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+
3
+ import { execFileSync } from 'child_process';
4
+ import { mkdirSync, mkdtempSync, rmSync, writeFileSync, renameSync } from 'fs';
5
+ import { tmpdir } from 'os';
6
+ import { join } from 'path';
7
+ import type { Context } from '@nocobase/actions';
8
+ import { log, readChatCommit } from '../actions/git-actions';
9
+
10
+ describe('Git chat commit context', () => {
11
+ let fixture: string;
12
+ let repoPath: string;
13
+ const previousBasePath = process.env.GIT_REPOS_BASE_PATH;
14
+
15
+ const runGit = (args: string[]) => execFileSync('git', ['-C', repoPath, ...args], { encoding: 'utf8' }).trim();
16
+
17
+ const commit = (message: string) => {
18
+ runGit(['-c', 'user.name=Test', '-c', 'user.email=test@example.invalid', 'add', '-A']);
19
+ runGit(['-c', 'user.name=Test', '-c', 'user.email=test@example.invalid', 'commit', '-m', message]);
20
+ return runGit(['rev-parse', 'HEAD']);
21
+ };
22
+
23
+ const createContext = (params: Record<string, unknown> = {}) => {
24
+ const repository = { get: (field: string) => (field === 'localPath' ? 'repository' : undefined) };
25
+ const context = {
26
+ action: { params: { repositoryId: 1, ...params } },
27
+ db: {
28
+ getRepository: vi.fn(() => ({ findOne: vi.fn().mockResolvedValue(repository) })),
29
+ },
30
+ throw: (status: number, message: string): never => {
31
+ throw Object.assign(new Error(message), { status });
32
+ },
33
+ body: undefined as unknown,
34
+ };
35
+ return context as unknown as Context & { body: unknown };
36
+ };
37
+
38
+ beforeEach(() => {
39
+ fixture = mkdtempSync(join(tmpdir(), 'git-chat-context-'));
40
+ repoPath = join(fixture, 'repository');
41
+ mkdirSync(repoPath);
42
+ process.env.GIT_REPOS_BASE_PATH = fixture;
43
+ execFileSync('git', ['init', '--initial-branch=main', repoPath], { stdio: 'ignore' });
44
+ });
45
+
46
+ afterEach(() => {
47
+ if (previousBasePath === undefined) delete process.env.GIT_REPOS_BASE_PATH;
48
+ else process.env.GIT_REPOS_BASE_PATH = previousBasePath;
49
+ if (fixture) rmSync(fixture, { recursive: true, force: true });
50
+ });
51
+
52
+ it('reads a root commit and returns only the bounded changed file context', async () => {
53
+ writeFileSync(join(repoPath, 'root.txt'), 'root content\n');
54
+ const rootCommit = commit('Initial commit');
55
+
56
+ const result = await readChatCommit(createContext(), rootCommit, 50, 1024);
57
+
58
+ expect(result.commitSha).toBe(rootCommit);
59
+ expect(result.subject).toBe('Initial commit');
60
+ expect(result.files).toEqual([{ oldPath: 'root.txt', newPath: 'root.txt', status: 'A' }]);
61
+ expect(result.diff).toContain('+root content');
62
+ expect(result.truncated).toBe(false);
63
+ });
64
+
65
+ it('reads history from the selected branch and applies the requested offset', async () => {
66
+ writeFileSync(join(repoPath, 'root.txt'), 'root\n');
67
+ commit('root');
68
+ writeFileSync(join(repoPath, 'main.txt'), 'main\n');
69
+ commit('main change');
70
+ runGit(['checkout', '-b', 'feature/chat-context']);
71
+ writeFileSync(join(repoPath, 'feature-one.txt'), 'first\n');
72
+ const firstFeatureCommit = commit('first feature change');
73
+ writeFileSync(join(repoPath, 'feature-two.txt'), 'second\n');
74
+ commit('second feature change');
75
+
76
+ const context = createContext({ branch: 'feature/chat-context', skip: 1, maxCount: 1 });
77
+ await log(context, vi.fn().mockResolvedValue(undefined));
78
+
79
+ const body = context.body as { data: { all: Array<{ hash: string }> } };
80
+ expect(body.data.all).toHaveLength(1);
81
+ expect(body.data.all[0].hash).toBe(firstFeatureCommit);
82
+ });
83
+
84
+ it('compares merge commits with their first parent', async () => {
85
+ writeFileSync(join(repoPath, 'root.txt'), 'root\n');
86
+ commit('root');
87
+ runGit(['checkout', '-b', 'feature']);
88
+ writeFileSync(join(repoPath, 'feature.txt'), 'feature change\n');
89
+ commit('feature change');
90
+ runGit(['checkout', 'main']);
91
+ writeFileSync(join(repoPath, 'main-only.txt'), 'main change\n');
92
+ commit('main change');
93
+ runGit(['merge', '--no-ff', 'feature', '-m', 'merge feature']);
94
+ const mergeCommit = runGit(['rev-parse', 'HEAD']);
95
+
96
+ const result = await readChatCommit(createContext(), mergeCommit, 50, 2048);
97
+
98
+ expect(result.subject).toBe('merge feature');
99
+ expect(result.files.map((file) => file.newPath)).toEqual(['feature.txt']);
100
+ expect(result.diff).toContain('+feature change');
101
+ expect(result.diff).not.toContain('main-only.txt');
102
+ });
103
+
104
+ it('lists binary changes without adding binary contents to the diff', async () => {
105
+ writeFileSync(join(repoPath, 'binary.bin'), Buffer.from([0, 1, 2, 255]));
106
+ const binaryCommit = commit('Add binary file');
107
+
108
+ const result = await readChatCommit(createContext(), binaryCommit, 50, 2048);
109
+
110
+ expect(result.files.map((file) => file.newPath)).toEqual(['binary.bin']);
111
+ expect(result.diff).not.toContain('GIT binary patch');
112
+ expect(result.limitations).toContain('Binary file contents are not included in the diff.');
113
+ });
114
+
115
+ it('preserves both names for a detected rename', async () => {
116
+ writeFileSync(join(repoPath, 'before.txt'), 'same contents\n');
117
+ commit('Add file');
118
+ renameSync(join(repoPath, 'before.txt'), join(repoPath, 'after.txt'));
119
+ const renameCommit = commit('Rename file');
120
+
121
+ const result = await readChatCommit(createContext(), renameCommit, 50, 2048);
122
+
123
+ expect(result.files).toEqual([{ oldPath: 'before.txt', newPath: 'after.txt', status: 'R100' }]);
124
+ });
125
+
126
+ it('truncates UTF-8 diffs at the byte limit without exceeding it', async () => {
127
+ writeFileSync(join(repoPath, 'unicode.txt'), `${'café 🙂\n'.repeat(80)}`);
128
+ const unicodeCommit = commit('Add unicode content');
129
+ const byteLimit = 280;
130
+
131
+ const result = await readChatCommit(createContext(), unicodeCommit, 50, byteLimit);
132
+
133
+ expect(Buffer.byteLength(result.diff, 'utf8')).toBeLessThanOrEqual(byteLimit);
134
+ expect(result.truncated).toBe(true);
135
+ expect(result.limitations).toContain('The diff was truncated to the configured limit.');
136
+ expect(result.diff).not.toMatch(/\uFFFD$/);
137
+ });
138
+ });
@@ -71,6 +71,58 @@ describe('Git credential destination', () => {
71
71
  await mergeRequests({ db, action: { params: { repositoryId: 1 } } } as unknown as Context, async () => {});
72
72
  expect(fetchMock).toHaveBeenCalledWith(expect.any(String), expect.objectContaining({ redirect: 'error' }));
73
73
  });
74
+
75
+ it('preserves GitHub next-page state when a merged-state page filters to no results', async () => {
76
+ const fetchMock = vi.fn().mockResolvedValue(
77
+ new Response(JSON.stringify([{ number: 42, state: 'closed', merged_at: null }]), {
78
+ status: 200,
79
+ headers: {
80
+ link: '<https://api.github.com/repos/team/r/pulls?page=2>; rel="next", <https://api.github.com/repos/team/r/pulls?page=4>; rel="last"',
81
+ },
82
+ }),
83
+ );
84
+ vi.stubGlobal('fetch', fetchMock);
85
+ const { db } = database('https://github.com/team/r', null, 'github');
86
+ const context = {
87
+ db,
88
+ action: { params: { repositoryId: 1, state: 'merged', page: 1, perPage: 20 } },
89
+ body: undefined as unknown,
90
+ };
91
+
92
+ await mergeRequests(context as unknown as Context, async () => {});
93
+
94
+ expect(fetchMock.mock.calls[0][0]).toContain('state=closed');
95
+ expect(context.body).toMatchObject({
96
+ success: true,
97
+ data: [],
98
+ pagination: { page: 1, perPage: 20, total: null, totalPages: null, hasMore: true },
99
+ });
100
+ });
101
+
102
+ it('uses GitLab next-page headers to preserve hasMore', async () => {
103
+ const fetchMock = vi.fn().mockResolvedValue(
104
+ new Response(JSON.stringify([{ id: 42, iid: 7, title: 'MR', state: 'opened' }]), {
105
+ status: 200,
106
+ headers: { 'x-next-page': '2', 'x-total-pages': '5', 'x-total': '81' },
107
+ }),
108
+ );
109
+ vi.stubGlobal('fetch', fetchMock);
110
+ const { db } = database();
111
+ const context = {
112
+ db,
113
+ action: { params: { repositoryId: 1, page: 1, perPage: 20 } },
114
+ body: undefined as unknown,
115
+ };
116
+
117
+ await mergeRequests(context as unknown as Context, async () => {});
118
+
119
+ expect(fetchMock.mock.calls[0][0]).toContain('page=1');
120
+ expect(context.body).toMatchObject({
121
+ success: true,
122
+ data: [{ id: 42, iid: 7, title: 'MR' }],
123
+ pagination: { page: 1, perPage: 20, total: 81, totalPages: 5, hasMore: true },
124
+ });
125
+ });
74
126
  });
75
127
 
76
128
  describe('Git filesystem and process credentials', () => {
@@ -5,6 +5,8 @@ import { mkdtempSync, mkdirSync, rmSync, symlinkSync, unlinkSync } from 'fs';
5
5
  import { tmpdir } from 'os';
6
6
  import { join } from 'path';
7
7
  import { createMockServer, type MockServer } from '@nocobase/test';
8
+ import { UNION_ROLE_KEY } from '../../../../@nocobase/plugin-acl/src/server/constants';
9
+ import { SystemRoleMode } from '../../../../@nocobase/plugin-acl/src/server/enum';
8
10
  import PluginGitManagerServer from '../plugin';
9
11
 
10
12
  describe('Git Manager HTTP integration', () => {
@@ -13,6 +15,8 @@ describe('Git Manager HTTP integration', () => {
13
15
  let fixture: string;
14
16
  let repoPath: string;
15
17
  let repositoryId: number;
18
+ let otherRepositoryId: number;
19
+ let rootCommitHash: string;
16
20
  const originalBase = process.env.GIT_REPOS_BASE_PATH;
17
21
 
18
22
  beforeAll(async () => {
@@ -38,6 +42,7 @@ describe('Git Manager HTTP integration', () => {
38
42
  { stdio: 'ignore' },
39
43
  );
40
44
  execFileSync('git', ['-C', repoPath, 'branch', 'marker'], { stdio: 'ignore' });
45
+ rootCommitHash = execFileSync('git', ['-C', repoPath, 'rev-parse', 'HEAD'], { encoding: 'utf8' }).trim();
41
46
  app = await createMockServer({
42
47
  acl: true,
43
48
  registerActions: true,
@@ -57,6 +62,29 @@ describe('Git Manager HTTP integration', () => {
57
62
  values: { name: 'fixture', localPath: 'repository', repoUrl: 'https://gitlab.com/team/fixture.git' },
58
63
  });
59
64
  repositoryId = repository.get('id');
65
+ const otherRepoPath = join(fixture, 'other-repository');
66
+ mkdirSync(otherRepoPath);
67
+ execFileSync('git', ['init', '-b', 'main', otherRepoPath], { stdio: 'ignore' });
68
+ execFileSync(
69
+ 'git',
70
+ [
71
+ '-C',
72
+ otherRepoPath,
73
+ '-c',
74
+ 'user.name=Test',
75
+ '-c',
76
+ 'user.email=test@example.invalid',
77
+ 'commit',
78
+ '--allow-empty',
79
+ '-m',
80
+ 'other fixture',
81
+ ],
82
+ { stdio: 'ignore' },
83
+ );
84
+ const otherRepository = await app.db.getRepository('gitRepositories').create({
85
+ values: { name: 'other-fixture', localPath: 'other-repository', repoUrl: 'https://gitlab.com/team/other.git' },
86
+ });
87
+ otherRepositoryId = otherRepository.get('id');
60
88
  agent = await app.agent().login(await app.db.getRepository('users').findOne());
61
89
  });
62
90
 
@@ -75,6 +103,178 @@ describe('Git Manager HTTP integration', () => {
75
103
  expect(response.body.data).toBeTruthy();
76
104
  });
77
105
 
106
+ it('filters chat context options and rechecks content against SQLite ACL scopes', async () => {
107
+ const createReaderAgent = async (
108
+ roleName: string,
109
+ includeCommitActions: boolean,
110
+ fields = ['id', 'name', 'defaultBranch', 'status'],
111
+ ) => {
112
+ await app.db.getRepository('roles').create({ values: { name: roleName } });
113
+ const scope = await agent.resource('dataSourcesRolesResourcesScopes').create({
114
+ values: {
115
+ name: `${roleName} repository scope`,
116
+ resourceName: 'gitRepositories',
117
+ scope: { $and: [{ id: { $in: [repositoryId] } }] },
118
+ },
119
+ });
120
+ const scopeId = scope.body.data.id;
121
+ const repositoryResource = {
122
+ name: 'gitRepositories',
123
+ usingActionsConfig: true,
124
+ actions: [
125
+ { name: 'list', fields, scopeId },
126
+ { name: 'get', fields, scopeId },
127
+ ],
128
+ };
129
+ await agent.resource('roles.resources', roleName).create({ values: repositoryResource });
130
+ if (includeCommitActions) {
131
+ const commitResource = {
132
+ name: 'gitManager',
133
+ usingActionsConfig: true,
134
+ actions: ['branches', 'log', 'commitDetail', 'diff'].map((name) => ({ name, scopeId })),
135
+ };
136
+ await agent.resource('roles.resources', roleName).create({ values: commitResource });
137
+ }
138
+ const user = await app.db.getRepository('users').create({ values: { roles: [roleName] } });
139
+ return app.agent().login(user);
140
+ };
141
+
142
+ const repoReader = await createReaderAgent('git-chat-repo-reader', false);
143
+ const repoResponse = await repoReader.get('/gitManager:chatContextOptions').query({ kind: 'repository' });
144
+ expect(repoResponse.status).toBe(200);
145
+ const repoPayload = repoResponse.body.data.data as {
146
+ capabilities: Record<string, boolean>;
147
+ items: Array<Record<string, unknown>>;
148
+ };
149
+ expect(repoPayload.capabilities.repository).toBe(true);
150
+ expect(repoPayload.capabilities.commit).toBe(false);
151
+ expect(repoPayload.capabilities['merge-request']).toBe(false);
152
+ expect(repoPayload.items).toEqual([
153
+ { id: repositoryId, name: 'fixture', defaultBranch: 'main', status: expect.any(String) },
154
+ ]);
155
+ expect(JSON.stringify(repoResponse.body)).not.toContain('localPath');
156
+ expect(JSON.stringify(repoResponse.body)).not.toContain('repoUrl');
157
+
158
+ const commitReader = await createReaderAgent('git-chat-commit-reader', true);
159
+ const commitOptions = await commitReader
160
+ .get('/gitManager:chatContextOptions')
161
+ .query({ kind: 'commit', repositoryId, pageSize: 1 });
162
+ expect(commitOptions.status).toBe(200);
163
+ const commitPayload = commitOptions.body.data.data as {
164
+ capabilities: Record<string, boolean>;
165
+ items: Array<{ id: number }>;
166
+ };
167
+ expect(commitPayload.capabilities.commit).toBe(true);
168
+ expect(commitPayload.items.map((item) => item.id)).toEqual([repositoryId]);
169
+
170
+ const unauthorizedPreselection = await commitReader
171
+ .get('/gitManager:chatContextOptions')
172
+ .query({ kind: 'commit', repositoryId: otherRepositoryId, pageSize: 1 });
173
+ expect(unauthorizedPreselection.status).toBe(200);
174
+ expect(unauthorizedPreselection.body.data.data.items).toEqual([]);
175
+
176
+ const authorizedContent = await commitReader.get('/gitManager:chatContextContent').query({
177
+ kind: 'commit',
178
+ repositoryId,
179
+ commitHash: rootCommitHash,
180
+ });
181
+ expect(authorizedContent.status).toBe(200);
182
+ const content = authorizedContent.body.data.data as Record<string, unknown>;
183
+ expect(content).toMatchObject({
184
+ type: 'git-commit',
185
+ repositoryId: String(repositoryId),
186
+ commitSha: rootCommitHash,
187
+ });
188
+ expect(JSON.stringify(authorizedContent.body)).not.toContain('localPath');
189
+ expect(JSON.stringify(authorizedContent.body)).not.toContain('repoUrl');
190
+
191
+ const revokedContent = await commitReader.get('/gitManager:chatContextContent').query({
192
+ kind: 'commit',
193
+ repositoryId: otherRepositoryId,
194
+ commitHash: rootCommitHash,
195
+ });
196
+ expect(revokedContent.status).toBe(403);
197
+
198
+ const hiddenNameReader = await createReaderAgent('git-chat-hidden-name-reader', false, [
199
+ 'id',
200
+ 'defaultBranch',
201
+ 'status',
202
+ ]);
203
+ const visibleFields = await hiddenNameReader.get('/gitManager:chatContextOptions').query({ kind: 'repository' });
204
+ expect(visibleFields.status).toBe(200);
205
+ expect(visibleFields.body.data.data.items).toEqual([
206
+ { id: repositoryId, defaultBranch: 'main', status: expect.any(String) },
207
+ ]);
208
+ const hiddenNameSearch = await hiddenNameReader
209
+ .get('/gitManager:chatContextOptions')
210
+ .query({ kind: 'repository', search: 'fixture' });
211
+ expect(hiddenNameSearch.status).toBe(200);
212
+ expect(hiddenNameSearch.body.data.data.items).toEqual([]);
213
+ });
214
+
215
+ it('combines repository and Git action permissions from current union roles', async () => {
216
+ const repositoryRole = 'git-chat-union-repository-reader';
217
+ const commitRole = 'git-chat-union-commit-reader';
218
+ await app.db.getRepository('roles').create({ values: { name: repositoryRole } });
219
+ await app.db.getRepository('roles').create({ values: { name: commitRole } });
220
+ const scope = await agent.resource('dataSourcesRolesResourcesScopes').create({
221
+ values: {
222
+ name: 'Git chat union repository scope',
223
+ resourceName: 'gitRepositories',
224
+ scope: { $and: [{ id: { $in: [repositoryId] } }] },
225
+ },
226
+ });
227
+ const scopeId = scope.body.data.id;
228
+ await agent.resource('roles.resources', repositoryRole).create({
229
+ values: {
230
+ name: 'gitRepositories',
231
+ usingActionsConfig: true,
232
+ actions: [
233
+ { name: 'list', fields: ['id', 'name', 'defaultBranch', 'status'], scopeId },
234
+ { name: 'get', fields: ['id', 'name', 'defaultBranch', 'status'], scopeId },
235
+ ],
236
+ },
237
+ });
238
+ await agent.resource('roles.resources', commitRole).create({
239
+ values: {
240
+ name: 'gitManager',
241
+ usingActionsConfig: true,
242
+ actions: ['branches', 'log', 'commitDetail', 'diff'].map((name) => ({ name, scopeId })),
243
+ },
244
+ });
245
+ const unionUser = await app.db.getRepository('users').create({
246
+ values: { roles: [repositoryRole, commitRole] },
247
+ });
248
+
249
+ await agent.resource('roles').setSystemRoleMode({ values: { roleMode: SystemRoleMode.allowUseUnion } });
250
+ try {
251
+ const unionAgent = await app.agent().login(unionUser, UNION_ROLE_KEY);
252
+ const response = await unionAgent
253
+ .get('/gitManager:chatContextOptions')
254
+ .query({ kind: 'commit', repositoryId, pageSize: 1 });
255
+
256
+ expect(response.status).toBe(200);
257
+ expect(response.body.data.data.capabilities.commit).toBe(true);
258
+ expect(response.body.data.data.items).toEqual([
259
+ { id: repositoryId, name: 'fixture', defaultBranch: 'main', status: expect.any(String) },
260
+ ]);
261
+ } finally {
262
+ await agent.resource('roles').setSystemRoleMode({ values: { roleMode: SystemRoleMode.default } });
263
+ }
264
+ });
265
+
266
+ it('does not expose Git context capabilities to an authenticated user without Git permissions', async () => {
267
+ await app.db.getRepository('roles').create({ values: { name: 'git-chat-no-access' } });
268
+ const user = await app.db.getRepository('users').create({ values: { roles: ['git-chat-no-access'] } });
269
+ const noGitAgent = await app.agent().login(user);
270
+
271
+ const response = await noGitAgent.get('/gitManager:chatContextOptions');
272
+
273
+ expect(response.status).toBe(200);
274
+ expect(response.body.data.data.capabilities).toEqual({ repository: false, 'merge-request': false, commit: false });
275
+ expect(response.body.data.data.items).toEqual([]);
276
+ });
277
+
78
278
  it.each([
79
279
  'clone',
80
280
  'pull',