Commit 4eafd59
authored
feat(bulk-import): repository list includes only "Left Overs" (#2465)
* feat(bulk-import): first implementation to add function to list all repositories for authenticated user
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): group number constants used in the function and name them
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* chore(bulk-import): removed unnecessary comments and renamed variables
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): add debug logging for page number extraction in listAllRepositoriesForAuthenticatedUser
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* chore(bulk-import): remove unused ghApiName option from listAllRepositoriesForAuthenticatedUser
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): introduce AuthenticatedUserRepositoryList type for repository listing
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* chore(bulk-import): update the type imports in utils.ts
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* chore(bulk-import): move the listAllRepositoriesForAuthenticatedUser function to the bottom of the file
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* chore(bulk-import): move documentation comments for listForAuthenticatedUser endpoint usage
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): make addGithubTokenRepositories use listAllRepositoriesForAuthenticatedUser
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* chore(githubApiService): remove reqParams from addGithubTokenRepositories call to fetch all repositories
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): filter out already imported repositories in findAllRepositories
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): enhance findAllRepositories to filter out already imported repositories
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* chore(bulk-import): remove unnecessary comments
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* refactor(findAllRepositories): simplify response formatting
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* fix(listAllRepositoriesForAuthenticatedUser): use Number.parseInt instead of parseInt
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(githubApiService): return search parameter to addGithubTokenRepositories arguments
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(addGithubTokenRepositories): change the way search in repository names is done to filter on backend side
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(addGithubTokenRepositories): streamline repository filtering logic
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): add AppInstallationRepositories type for installation accessible repositories
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): add function to list all repositories accessible to installation
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* chore(bulk-import): rewrite responses data concatenation to unshifting in listAllRepositoriesForAuthenticatedUser
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): adding github app repositories uses listAllRepositoriesAccessibleToInstallation if no search
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): refactor addGithubAppRepositories to use listAllRepositoriesAccessibleToInstallation for search functionality
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): streamline addGithubAppRepositories by consolidating repository fetching and filtering logic
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* fix(bulk-import): normalize search queries to lowercase in addGithubAppRepositories and addGithubTokenRepositories
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): remove pagination variables from addGithubAppRepositories
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): remove ghConfig parameter from addGithubAppRepositories and related function calls
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* fix(bulk-import): move sorting of repositories before slicing the repository list
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* fix(bulk-import): safely access repository_selection from pageResponses in listAllRepositoriesAccessibleToInstallation
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* test(bulk-import): update mocks related to listReposAccessibleToInstallation
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* test(bulk-import): set default mock return value for listForAuthenticatedUser in GithubApiService tests' beforeEach hook
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* test(bulk-import): correct typo in test name
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* fix(bulk-import): sort repositories before formatting response
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): refactored getAllPages function for paginated API responses
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): add OctokitResponse type import for improved type handling
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): refactor repository listing functions to utilize getAllPages
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): add types for authenticated user repository and app installation repositories responses
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): update types for authenticated user repository and app installation repositories responses
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): rename and refactor pagination functions for improved clarity and consistency
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): rename search variable to lowercaseSearch to better represent its content
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): add function to list all repositories for authenticated user from gitlab
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): refactor addGitlabTokenRepositories to use listAllRepositoriesForAuthenticatedUser for gitlab
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): remove unused parameters from addGithubTokenRepositories call
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): update findAllRepositories to use unique catalog URL locations
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* chore(bulk-import): remove pageNumber parameter from getRepositoriesFromIntegrations calls
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* feat(bulk-import): optimize findAllRepositories to fetch imported and all repositories concurrently
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* fix(bulk-import): change listAllRepositoriesForAuthenticatedUser to throw error on failure
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* test(bulk-import): add mock handler for catalog API locations in test fixtures
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* test(bulk-import): export CATALOG_API_LOCATIONS_LOCAL_ADDR for external use
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* test(bulk-import): add repository filtering tests
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* test(bulk-import): add repository filtering tests for GitLab integration
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* docs(bulk-import): added changeset file
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* test(bulk-import): update target URLs to use 'blob/master' for catalog-info.yaml
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* test(bulk-import): add test case for fetching all repositories with non-root catalog location
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* fix(bulk-import): improve repository import logic to handle catalog URL instead of substrings
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* fix(bulk-import): improve github pagination using octokit.paginate
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* fix(bulk-import): simplify response handling in listAllRepositoriesAccessibleToInstallation
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* test(bulk-import): enhanced mocked pagination handling to return repositories array from response
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* fix(bulk-import): update import statement for RestEndpointMethodTypes to use type syntax
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* chore(bulk-import): remove unused types replaced with SCM types
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* fix(bulk-import): fix inconsistencies after merge
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* test(bulk-import): add SCM tokens to repository requests in tests
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* chore(bulk-import): removed unused pagination options
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* chore(bulk-import): moved the listAllRepositories functions for github and gitlab
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* fix(bulk-import): removed slicing of repositories to return the whole array
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* fix(RepositoriesTable): introduced client-side pagination and search to the repositories table
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* docs(bulk-import): updated changeset file to include frontend changes
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
* docs: updated x-scm-tokens parameter description
Signed-off-by: Dominik Augustín <daugusti@redhat.com>
---------
Signed-off-by: Dominik Augustín <daugusti@redhat.com>1 parent ba41609 commit 4eafd59
16 files changed
Lines changed: 817 additions & 273 deletions
File tree
- workspaces/bulk-import
- .changeset
- plugins
- bulk-import-backend
- __fixtures__
- api-docs/Apis
- src
- github
- utils
- gitlab
- utils
- scm
- service/handlers/repository
- bulk-import/src/components/AddRepositories
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
499 | 502 | | |
500 | 503 | | |
501 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
502 | 509 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
Lines changed: 58 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
134 | 137 | | |
135 | 138 | | |
136 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
137 | 150 | | |
138 | 151 | | |
139 | 152 | | |
| |||
211 | 224 | | |
212 | 225 | | |
213 | 226 | | |
214 | | - | |
215 | | - | |
216 | | - | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
217 | 233 | | |
218 | 234 | | |
219 | 235 | | |
| |||
239 | 255 | | |
240 | 256 | | |
241 | 257 | | |
242 | | - | |
243 | | - | |
| 258 | + | |
| 259 | + | |
244 | 260 | | |
245 | | - | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
246 | 266 | | |
247 | 267 | | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
264 | 288 | | |
265 | 289 | | |
266 | 290 | | |
| |||
311 | 335 | | |
312 | 336 | | |
313 | 337 | | |
314 | | - | |
| 338 | + | |
315 | 339 | | |
316 | 340 | | |
317 | 341 | | |
318 | 342 | | |
319 | 343 | | |
320 | 344 | | |
321 | | - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
322 | 350 | | |
323 | 351 | | |
324 | 352 | | |
| |||
351 | 379 | | |
352 | 380 | | |
353 | 381 | | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | 382 | | |
358 | 383 | | |
359 | 384 | | |
| |||
384 | 409 | | |
385 | 410 | | |
386 | 411 | | |
387 | | - | |
| 412 | + | |
388 | 413 | | |
389 | 414 | | |
390 | 415 | | |
391 | 416 | | |
392 | | - | |
393 | | - | |
394 | 417 | | |
395 | 418 | | |
396 | 419 | | |
| |||
403 | 426 | | |
404 | 427 | | |
405 | 428 | | |
406 | | - | |
407 | | - | |
408 | 429 | | |
409 | 430 | | |
410 | 431 | | |
| |||
418 | 439 | | |
419 | 440 | | |
420 | 441 | | |
421 | | - | |
| 442 | + | |
422 | 443 | | |
423 | 444 | | |
424 | 445 | | |
| |||
433 | 454 | | |
434 | 455 | | |
435 | 456 | | |
436 | | - | |
| 457 | + | |
437 | 458 | | |
438 | 459 | | |
439 | 460 | | |
440 | 461 | | |
441 | | - | |
442 | | - | |
443 | 462 | | |
444 | 463 | | |
445 | 464 | | |
| |||
Lines changed: 2 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
339 | 338 | | |
340 | 339 | | |
341 | 340 | | |
342 | 341 | | |
343 | | - | |
344 | | - | |
345 | 342 | | |
346 | 343 | | |
347 | 344 | | |
| |||
356 | 353 | | |
357 | 354 | | |
358 | 355 | | |
359 | | - | |
360 | | - | |
361 | 356 | | |
362 | 357 | | |
363 | 358 | | |
| |||
383 | 378 | | |
384 | 379 | | |
385 | 380 | | |
386 | | - | |
387 | | - | |
388 | 381 | | |
389 | 382 | | |
390 | 383 | | |
| |||
404 | 397 | | |
405 | 398 | | |
406 | 399 | | |
407 | | - | |
| 400 | + | |
408 | 401 | | |
409 | 402 | | |
410 | 403 | | |
| |||
429 | 422 | | |
430 | 423 | | |
431 | 424 | | |
432 | | - | |
433 | 425 | | |
434 | 426 | | |
435 | 427 | | |
436 | 428 | | |
437 | | - | |
438 | | - | |
439 | 429 | | |
440 | 430 | | |
441 | 431 | | |
| |||
448 | 438 | | |
449 | 439 | | |
450 | 440 | | |
451 | | - | |
452 | | - | |
453 | 441 | | |
454 | 442 | | |
455 | 443 | | |
| |||
463 | 451 | | |
464 | 452 | | |
465 | 453 | | |
466 | | - | |
| 454 | + | |
467 | 455 | | |
468 | 456 | | |
469 | 457 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
0 commit comments