RHIDP 7065: gitlab bulk import backend support#1336
Merged
AndrienkoAleksandr merged 23 commits intoredhat-developer:mainfrom Sep 19, 2025
Merged
Conversation
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
32cc565 to
d89fee6
Compare
cb33e29 to
d773ea8
Compare
556f426 to
e99bc31
Compare
Contributor
|
I proposed changes lholmquist#1 |
ae75260 to
52a42e1
Compare
bca24d3 to
b90d3a0
Compare
AndrienkoAleksandr
requested changes
Sep 17, 2025
Contributor
AndrienkoAleksandr
left a comment
There was a problem hiding this comment.
I tested your code using curl and noticed a bug — created import jobs don’t appear in the import list. I can share a patch with a quick fix as a hint, but please note that the unit test is failing. With this fix API looks working.
fix-get-imports-method-for-gitlab.patch
#Hints: My test curl commands:
list organizations:
curl -X GET "http://localhost:7007/api/bulk-import/organizations?pagePerIntegration=1&sizePerIntegration=5&search=&approvalTool=GITLAB" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${token}"
list repositories
curl -X GET "http://localhost:7007/api/bulk-import/repositories?pagePerIntegration=1&sizePerIntegration=5&search=&approvalTool=GITLAB" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${token}"
list repositories by org
curl -X GET "http://localhost:7007/api/bulk-import/organizations/my-org-2/repositories?pagePerIntegration=1&sizePerIntegration=5&search=&approvalTool=GITLAB" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${token}"
get list imports
curl -X GET "http://localhost:7007/api/bulk-import/imports?page=1&size=5&search=&sortColumn=repository.name&sortOrder=asc" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${token}"
create GitLab import
curl -X POST http://localhost:7007/api/bulk-import/imports \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${token}" \
-d '[
{
"approvalTool": "GITLAB",
"codeOwnersFileAsEntityOwner": false,
"catalogEntityName": "test-001",
"repository": {
"id": "logarifm6/test-001",
"url": "https://gitlab.com/logarifm6/test-001",
"name": "test-001",
"organization": "logarifm6",
"defaultBranch": "main"
},
"catalogInfoContent": "apiVersion: backstage.io/v1alpha1\nkind: Component\nmetadata:\n name: test-001\n annotations:\n github.com/project-slug: logarifm6/test-001\nspec:\n type: other\n lifecycle: unknown\n owner: user:default/andrienkoaleksandr\n",
"github": {
"pullRequest": {
"title": "Add catalog-info.yaml config file",
"body": "This pull request adds a **Backstage entity metadata file**\nto this repository so that the component can\nbe added to the [software catalog](http://localhost:3000/catalog).\nAfter this pull request is merged, the component will become available.\nFor more information, read an [overview of the Backstage software catalog](https://backstage.io/docs/features/software-catalog/).\nView the import job in your app [here](http://localhost:3000/bulk-import/repositories?repository=https://github.com/logarifm6/test-001&defaultBranch=main)."
}
}
}
]' -v
Delete import
curl -X DELETE "http://localhost:7007/api/bulk-import/import/by-repo?repo=https://gitlab.com/logarifm6/test-001&defaultBranch=main" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${token}"
* feat(bulk-import-backend): fix typization for @gitbeaker/rest Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * squash: updates to make the tests work --------- Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> Co-authored-by: Oleksandr Andriienko <oandriie@redhat.com>
Co-authored-by: Christoph Jerolimov <jerolimov@gmail.com>
aea4191 to
420a33b
Compare
|
AndrienkoAleksandr
approved these changes
Sep 18, 2025
elai-shalev
pushed a commit
to elai-shalev/rhdh-plugins
that referenced
this pull request
Jan 21, 2026
* feat(bulk-import-backend): addition of Gitlab support to the bulk-import backend. see https://issues.redhat.com/browse/RHIDP-8281 * squash: type fixes * squash: removing comments and todos * squash: consolidate duplicated code * squash: consolidate duplicated code * squash: a little cleanup * squash: update @gitbeaker/rest module to the latest release * squash: prettier fix for api-docs * squash: adding in an exclusion for the dupe tests * squash: prettier fixes * squash: code cleanup * squash: more code cleanup * squash: fixing sonarcloud secrutiy hotspots * squash: Gitlab bulk import fix typization (redhat-developer#2) * feat(bulk-import-backend): fix typization for @gitbeaker/rest Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * squash: updates to make the tests work --------- Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> Co-authored-by: Oleksandr Andriienko <oandriie@redhat.com> * squash add back the things i forgot i commented out * squash: findAllImports needed both integrations. fixed the delete import thing * squash: trying to remove duplications * squash: removing commented code * squash: sending back the approvalTool * squash: update and fix tests * squash: remove commented code * squash: Update workspaces/bulk-import/.changeset/rude-boats-cough.md Co-authored-by: Christoph Jerolimov <jerolimov@gmail.com> * squash: update yarn.lock after the rebase --------- Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> Co-authored-by: Oleksandr Andriienko <oandriie@redhat.com> Co-authored-by: Christoph Jerolimov <jerolimov@gmail.com>
elai-shalev
pushed a commit
to elai-shalev/rhdh-plugins
that referenced
this pull request
Jan 21, 2026
* feat(bulk-import-backend): addition of Gitlab support to the bulk-import backend. see https://issues.redhat.com/browse/RHIDP-8281 * squash: type fixes * squash: removing comments and todos * squash: consolidate duplicated code * squash: consolidate duplicated code * squash: a little cleanup * squash: update @gitbeaker/rest module to the latest release * squash: prettier fix for api-docs * squash: adding in an exclusion for the dupe tests * squash: prettier fixes * squash: code cleanup * squash: more code cleanup * squash: fixing sonarcloud secrutiy hotspots * squash: Gitlab bulk import fix typization (redhat-developer#2) * feat(bulk-import-backend): fix typization for @gitbeaker/rest Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> * squash: updates to make the tests work --------- Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> Co-authored-by: Oleksandr Andriienko <oandriie@redhat.com> * squash add back the things i forgot i commented out * squash: findAllImports needed both integrations. fixed the delete import thing * squash: trying to remove duplications * squash: removing commented code * squash: sending back the approvalTool * squash: update and fix tests * squash: remove commented code * squash: Update workspaces/bulk-import/.changeset/rude-boats-cough.md Co-authored-by: Christoph Jerolimov <jerolimov@gmail.com> * squash: update yarn.lock after the rebase --------- Signed-off-by: Oleksandr Andriienko <oandriie@redhat.com> Co-authored-by: Oleksandr Andriienko <oandriie@redhat.com> Co-authored-by: Christoph Jerolimov <jerolimov@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Hey, I just made a Pull Request!
✔️ Checklist