@@ -309,17 +309,17 @@ describe("getGiteaRepoOwner - Organization Override Tests", () => {
309
309
excludeOrgs : [ ] ,
310
310
mirrorPublicOrgs : false ,
311
311
publicOrgs : [ ] ,
312
- skipStarredIssues : false
312
+ skipStarredIssues : false ,
313
+ mirrorStrategy : "preserve"
313
314
} ,
314
315
giteaConfig : {
315
316
defaultOwner : "giteauser" ,
316
317
url : "https://gitea.example.com" ,
317
318
token : "gitea-token" ,
318
- defaultOrg : "github-mirrors" ,
319
+ organization : "github-mirrors" ,
319
320
visibility : "public" ,
320
321
starredReposOrg : "starred" ,
321
- preserveVisibility : false ,
322
- mirrorStrategy : "preserve"
322
+ preserveVisibility : false
323
323
}
324
324
} ;
325
325
@@ -381,12 +381,15 @@ describe("getGiteaRepoOwner - Organization Override Tests", () => {
381
381
expect ( result ) . toBe ( "myorg" ) ;
382
382
} ) ;
383
383
384
- test ( "single-org strategy: personal repos go to defaultOrg " , ( ) => {
384
+ test ( "mixed strategy: personal repos go to organization " , ( ) => {
385
385
const configWithMixed = {
386
386
...baseConfig ,
387
+ githubConfig : {
388
+ ...baseConfig . githubConfig ! ,
389
+ mirrorStrategy : "mixed" as const
390
+ } ,
387
391
giteaConfig : {
388
392
...baseConfig . giteaConfig ! ,
389
- mirrorStrategy : "mixed" as const ,
390
393
organization : "github-mirrors"
391
394
}
392
395
} ;
@@ -395,12 +398,15 @@ describe("getGiteaRepoOwner - Organization Override Tests", () => {
395
398
expect ( result ) . toBe ( "github-mirrors" ) ;
396
399
} ) ;
397
400
398
- test ( "single-org strategy: org repos also go to defaultOrg " , ( ) => {
401
+ test ( "mixed strategy: org repos preserve their structure " , ( ) => {
399
402
const configWithMixed = {
400
403
...baseConfig ,
404
+ githubConfig : {
405
+ ...baseConfig . githubConfig ! ,
406
+ mirrorStrategy : "mixed" as const
407
+ } ,
401
408
giteaConfig : {
402
409
...baseConfig . giteaConfig ! ,
403
- mirrorStrategy : "mixed" as const ,
404
410
organization : "github-mirrors"
405
411
}
406
412
} ;
@@ -412,8 +418,8 @@ describe("getGiteaRepoOwner - Organization Override Tests", () => {
412
418
test ( "flat-user strategy: all repos go to defaultOwner" , ( ) => {
413
419
const configWithFlatUser = {
414
420
...baseConfig ,
415
- giteaConfig : {
416
- ...baseConfig . giteaConfig ! ,
421
+ githubConfig : {
422
+ ...baseConfig . githubConfig ! ,
417
423
mirrorStrategy : "flat-user" as const
418
424
}
419
425
} ;
0 commit comments