File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
apps/dokploy/components/dashboard/settings/git/gitlab
packages/server/src/utils/providers Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,9 @@ export const AddGitlabProvider = () => {
248
248
name = "groupName"
249
249
render = { ( { field } ) => (
250
250
< FormItem >
251
- < FormLabel > Group Name (Optional)</ FormLabel >
251
+ < FormLabel >
252
+ Group Name (Optional, Comma-Separated List)
253
+ </ FormLabel >
252
254
< FormControl >
253
255
< Input
254
256
placeholder = "For organization/group access use the slugish name of the group eg: my-org"
Original file line number Diff line number Diff line change @@ -156,7 +156,9 @@ export const EditGitlabProvider = ({ gitlabId }: Props) => {
156
156
name = "groupName"
157
157
render = { ( { field } ) => (
158
158
< FormItem >
159
- < FormLabel > Group Name (Optional)</ FormLabel >
159
+ < FormLabel >
160
+ Group Name (Optional, Comma-Separated List)
161
+ </ FormLabel >
160
162
< FormControl >
161
163
< Input
162
164
placeholder = "For organization/group access use the slugish name of the group eg: my-org"
Original file line number Diff line number Diff line change @@ -264,7 +264,11 @@ export const getGitlabRepositories = async (gitlabId?: string) => {
264
264
const groupName = gitlabProvider . groupName ?. toLowerCase ( ) ;
265
265
266
266
if ( groupName ) {
267
- return full_path . toLowerCase ( ) . includes ( groupName ) && kind === "group" ;
267
+ const isIncluded = groupName
268
+ . split ( "," )
269
+ . some ( ( name ) => full_path . toLowerCase ( ) . includes ( name ) ) ;
270
+
271
+ return isIncluded && kind === "group" ;
268
272
}
269
273
return kind === "user" ;
270
274
} ) ;
@@ -431,7 +435,9 @@ export const testGitlabConnection = async (
431
435
const { full_path, kind } = repo . namespace ;
432
436
433
437
if ( groupName ) {
434
- return full_path . toLowerCase ( ) . includes ( groupName ) && kind === "group" ;
438
+ return groupName
439
+ . split ( "," )
440
+ . some ( ( name ) => full_path . toLowerCase ( ) . includes ( name ) ) ;
435
441
}
436
442
return kind === "user" ;
437
443
} ) ;
You can’t perform that action at this time.
0 commit comments