Skip to content

Commit 1830196

Browse files
committed
fix(gitlab): clarify byte limits and use browser file fixtures
1 parent ad7b15f commit 1830196

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

‎apps/docs/openapi-v2-resources.json‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24566,7 +24566,6 @@
2456624566
"content": {
2456724567
"type": "string",
2456824568
"minLength": 1,
24569-
"maxLength": 8388608,
2457024569
"description": "UTF-8 CSV contents, up to 8 MiB. Both files travel in one request body limited to 10 MiB after JSON encoding."
2457124570
}
2457224571
},
@@ -24586,7 +24585,6 @@
2458624585
"content": {
2458724586
"type": "string",
2458824587
"minLength": 1,
24589-
"maxLength": 8388608,
2459024588
"description": "UTF-8 CSV contents, up to 8 MiB. Both files travel in one request body limited to 10 MiB after JSON encoding."
2459124589
}
2459224590
},

‎apps/sim/connectors/gitlab/permission-config/use-permission-form.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/** @vitest-environment jsdom */
2-
import { File } from 'node:buffer'
32
import { act, createElement } from 'react'
43
import { createRoot } from 'react-dom/client'
54
import { describe, expect, it, vi } from 'vitest'
@@ -20,7 +19,9 @@ describe('GitLab permission file selection', () => {
2019
}
2120
act(() => root.render(createElement(Probe)))
2221
const csv = (content: string, filename: string) =>
23-
Object.assign(new File([content], filename), { webkitRelativePath: '' })
22+
Object.assign(new File([content], filename), {
23+
arrayBuffer: async () => new TextEncoder().encode(content).buffer,
24+
})
2425
try {
2526
act(() => current().setMode('csv'))
2627
const users = csv('1,a@example.test\n'.repeat(300_000), 'users.csv')

‎apps/sim/lib/api/contracts/knowledge/gitlab-permissions.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { z } from 'zod'
22
import {
3-
GITLAB_CSV_MAX_BYTES,
43
GITLAB_CSV_MAX_ROWS,
54
GITLAB_PERMISSION_MODES,
65
} from '@/connectors/gitlab/permission-config/types'
@@ -11,7 +10,6 @@ const gitLabCsvUploadSchema = z
1110
content: z
1211
.string()
1312
.min(1)
14-
.max(GITLAB_CSV_MAX_BYTES)
1513
.describe(
1614
'UTF-8 CSV contents, up to 8 MiB. Both files travel in one request body limited to 10 MiB after JSON encoding.'
1715
),

0 commit comments

Comments
 (0)