Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c71de59
feat(bulk-import-backend): addition of Gitlab support to the bulk-imp…
lholmquist Jul 28, 2025
9ee10d6
squash: type fixes
lholmquist Aug 27, 2025
928bace
squash: removing comments and todos
lholmquist Aug 28, 2025
922fdb1
squash: consolidate duplicated code
lholmquist Aug 28, 2025
4b2334d
squash: consolidate duplicated code
lholmquist Aug 28, 2025
b8104a1
squash: a little cleanup
lholmquist Aug 28, 2025
66af9e4
squash: update @gitbeaker/rest module to the latest release
lholmquist Sep 2, 2025
5a11e7e
squash: prettier fix for api-docs
lholmquist Sep 2, 2025
725b71d
squash: adding in an exclusion for the dupe tests
lholmquist Sep 2, 2025
ddb69f1
squash: prettier fixes
lholmquist Sep 3, 2025
d6de9eb
squash: code cleanup
lholmquist Sep 3, 2025
03d811f
squash: more code cleanup
lholmquist Sep 3, 2025
b174444
squash: fixing sonarcloud secrutiy hotspots
lholmquist Sep 3, 2025
9fdfb24
squash: Gitlab bulk import fix typization (#2)
lholmquist Sep 4, 2025
dc6510e
squash add back the things i forgot i commented out
lholmquist Sep 4, 2025
611ddd1
squash: findAllImports needed both integrations. fixed the delete im…
lholmquist Sep 10, 2025
937dec1
squash: trying to remove duplications
lholmquist Sep 15, 2025
794aaf5
squash: removing commented code
lholmquist Sep 15, 2025
b9b37f1
squash: sending back the approvalTool
lholmquist Sep 17, 2025
c0e7047
squash: update and fix tests
lholmquist Sep 17, 2025
355965f
squash: remove commented code
lholmquist Sep 18, 2025
1dae6aa
squash: Update workspaces/bulk-import/.changeset/rude-boats-cough.md
lholmquist Sep 18, 2025
420a33b
squash: update yarn.lock after the rebase
lholmquist Sep 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sonar.cpd.exclusions=workspaces/bulk-import/plugins/bulk-import-backend/src/**/*.test.*
5 changes: 5 additions & 0 deletions workspaces/bulk-import/.changeset/rude-boats-cough.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@red-hat-developer-hub/backstage-plugin-bulk-import-backend': minor
---

Add the ability to use GitLab for bulk imports
3 changes: 3 additions & 0 deletions workspaces/bulk-import/app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ backend:
# workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir

integrations:
gitlab:
- host: gitlab.com
token: ${GITLAB_TOKEN}
github:
- host: github.com
# This is a Personal Access Token or PAT from GitHub. You can find out how to generate this token, and more information
Expand Down
6 changes: 3 additions & 3 deletions workspaces/bulk-import/examples/org.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ apiVersion: backstage.io/v1alpha1
kind: User
metadata:
# replace this with <your_github_id>
name: ciiay
name: lholmquist
spec:
profile:
# replace this with <your_github_email>
email: yicai@redhat.com
email: lholmqui@redhat.com
memberOf: [rhdh-ui-test]
---
apiVersion: backstage.io/v1alpha1
Expand All @@ -38,4 +38,4 @@ spec:
displayName: RHDH UI test
children: []
# replace member with <your_github_id> on L23
members: [ciiay]
members: [lholmquist]
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,40 @@
"target": "https://github.com/my-org-1/my-repo-with-existing-catalog-info-in-default-branch/blob/main/plugins/my-plugin/examples/templates/01-some-template.yaml",
"type": "url"
}
},
{
"data": {
"id": "8",
"target": "https://gitlab.com/saltypig1/funtimes/blob/dev/catalog-info.yaml",
"type": "url"
}
},
{
"data": {
"id": "9",
"target": "https://gitlab.com/my-ent-org-2/swapi-node/blob/main/catalog-info.yaml",
"type": "url"
}
},
{
"data": {
"id": "10",
"target": "https://gitlab.com/my-ent-org-2/swapi-node/blob/main/catalog-info.yaml",
"type": "url"
}
},
{
"data": {
"id": "11",
"target": "https://gitlab.com/my-ent-org-2/swapi-node/blob/feature/myAwesomeFeat/catalog-info.yaml",
"type": "url"
}
},
{
"data": {
"id": "12",
"target": "https://gitlab.com/my-org-1/my-repo-with-existing-catalog-info-in-default-branch/blob/main/plugins/my-plugin/examples/templates/01-some-template.yaml",
"type": "url"
}
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
{
"token": "ghs_16C7e42F292c6912E7710c838347Ae178B4a",
"expires_at": "2016-07-11T22:14:10Z",
"permissions": {
"issues": "write",
"contents": "read"
},
"repository_selection": "selected",
"repositories": [
{
"id": 1296269,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://github.com/users/octocat/followers",
"following_url": "https://github.com/users/octocat/following{/other_user}",
"gists_url": "https://github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://github.com/users/octocat/subscriptions",
"organizations_url": "https://github.com/users/octocat/orgs",
"repos_url": "https://github.com/users/octocat/repos",
"events_url": "https://github.com/users/octocat/events{/privacy}",
"received_events_url": "https://github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Hello-World",
"description": "This your first repo!",
"fork": false,
"url": "https://github.com/repos/octocat/Hello-World",
"archive_url": "https://github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
"assignees_url": "https://github.com/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "https://github.com/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "https://github.com/repos/octocat/Hello-World/branches{/branch}",
"collaborators_url": "https://github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "https://github.com/repos/octocat/Hello-World/comments{/number}",
"commits_url": "https://github.com/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "https://github.com/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "https://github.com/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "https://github.com/repos/octocat/Hello-World/contributors",
"deployments_url": "https://github.com/repos/octocat/Hello-World/deployments",
"downloads_url": "https://github.com/repos/octocat/Hello-World/downloads",
"events_url": "https://github.com/repos/octocat/Hello-World/events",
"forks_url": "https://github.com/repos/octocat/Hello-World/forks",
"git_commits_url": "https://github.com/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "https://github.com/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "https://github.com/repos/octocat/Hello-World/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World.git",
"issue_comment_url": "https://github.com/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "https://github.com/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "https://github.com/repos/octocat/Hello-World/issues{/number}",
"keys_url": "https://github.com/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "https://github.com/repos/octocat/Hello-World/labels{/name}",
"languages_url": "https://github.com/repos/octocat/Hello-World/languages",
"merges_url": "https://github.com/repos/octocat/Hello-World/merges",
"milestones_url": "https://github.com/repos/octocat/Hello-World/milestones{/number}",
"notifications_url": "https://github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
"pulls_url": "https://github.com/repos/octocat/Hello-World/pulls{/number}",
"releases_url": "https://github.com/repos/octocat/Hello-World/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"stargazers_url": "https://github.com/repos/octocat/Hello-World/stargazers",
"statuses_url": "https://github.com/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_url": "https://github.com/repos/octocat/Hello-World/subscribers",
"subscription_url": "https://github.com/repos/octocat/Hello-World/subscription",
"tags_url": "https://github.com/repos/octocat/Hello-World/tags",
"teams_url": "https://github.com/repos/octocat/Hello-World/teams",
"trees_url": "https://github.com/repos/octocat/Hello-World/git/trees{/sha}",
"clone_url": "https://github.com/octocat/Hello-World.git",
"mirror_url": "git:git.example.com/octocat/Hello-World",
"hooks_url": "https://github.com/repos/octocat/Hello-World/hooks",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks_count": 9,
"stargazers_count": 80,
"watchers_count": 80,
"size": 108,
"default_branch": "master",
"open_issues_count": 0,
"is_template": true,
"topics": ["octocat", "atom", "electron", "api"],
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"has_pages": false,
"has_downloads": true,
"archived": false,
"disabled": false,
"visibility": "public",
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"permissions": {
"admin": false,
"push": false,
"pull": true
},
"allow_rebase_merge": true,
"template_repository": null,
"temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O",
"allow_squash_merge": true,
"allow_auto_merge": false,
"delete_branch_on_merge": true,
"allow_merge_commit": true,
"subscribers_count": 42,
"network_count": 0,
"license": {
"key": "mit",
"name": "MIT License",
"url": "https://github.com/licenses/mit",
"spdx_id": "MIT",
"node_id": "MDc6TGljZW5zZW1pdA==",
"html_url": "https://github.com/licenses/mit"
},
"forks": 1,
"open_issues": 1,
"watchers": 1
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"id": 1,
"account": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://github.com/users/octocat/followers",
"following_url": "https://github.com/users/octocat/following{/other_user}",
"gists_url": "https://github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://github.com/users/octocat/subscriptions",
"organizations_url": "https://github.com/users/octocat/orgs",
"repos_url": "https://github.com/users/octocat/repos",
"events_url": "https://github.com/users/octocat/events{/privacy}",
"received_events_url": "https://github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"access_tokens_url": "https://github.com/app/installations/1/access_tokens",
"repositories_url": "https://github.com/installation/repositories",
"html_url": "https://github.com/organizations/github/settings/installations/1",
"app_id": 1,
"target_id": 1,
"target_type": "Organization",
"permissions": {
"checks": "write",
"metadata": "read",
"contents": "read"
},
"events": ["push", "pull_request"],
"single_file_name": "config.yaml",
"has_multiple_single_files": true,
"single_file_paths": ["config.yml", ".github/issue_TEMPLATE.md"],
"repository_selection": "selected",
"created_at": "2017-07-08T16:18:44-04:00",
"updated_at": "2017-07-08T16:18:44-04:00",
"app_slug": "github-actions",
"suspended_at": null,
"suspended_by": null
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"total_count": 1,
"repositories": [
{
"id": 1296269,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjk2MjY5",
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"owner": {
"login": "octocat",
"id": 1,
"node_id": "MDQ6VXNlcjE=",
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://github.com/users/octocat/followers",
"following_url": "https://github.com/users/octocat/following{/other_user}",
"gists_url": "https://github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://github.com/users/octocat/subscriptions",
"organizations_url": "https://github.com/users/octocat/orgs",
"repos_url": "https://github.com/users/octocat/repos",
"events_url": "https://github.com/users/octocat/events{/privacy}",
"received_events_url": "https://github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/octocat/Hello-World",
"description": "This your first repo!",
"fork": false,
"url": "https://github.com/repos/octocat/Hello-World",
"archive_url": "https://github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
"assignees_url": "https://github.com/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "https://github.com/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "https://github.com/repos/octocat/Hello-World/branches{/branch}",
"collaborators_url": "https://github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "https://github.com/repos/octocat/Hello-World/comments{/number}",
"commits_url": "https://github.com/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "https://github.com/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "https://github.com/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "https://github.com/repos/octocat/Hello-World/contributors",
"deployments_url": "https://github.com/repos/octocat/Hello-World/deployments",
"downloads_url": "https://github.com/repos/octocat/Hello-World/downloads",
"events_url": "https://github.com/repos/octocat/Hello-World/events",
"forks_url": "https://github.com/repos/octocat/Hello-World/forks",
"git_commits_url": "https://github.com/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "https://github.com/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "https://github.com/repos/octocat/Hello-World/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World.git",
"issue_comment_url": "https://github.com/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "https://github.com/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "https://github.com/repos/octocat/Hello-World/issues{/number}",
"keys_url": "https://github.com/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "https://github.com/repos/octocat/Hello-World/labels{/name}",
"languages_url": "https://github.com/repos/octocat/Hello-World/languages",
"merges_url": "https://github.com/repos/octocat/Hello-World/merges",
"milestones_url": "https://github.com/repos/octocat/Hello-World/milestones{/number}",
"notifications_url": "https://github.com/repos/octocat/Hello-World/notifications{?since,all,participating}",
"pulls_url": "https://github.com/repos/octocat/Hello-World/pulls{/number}",
"releases_url": "https://github.com/repos/octocat/Hello-World/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"stargazers_url": "https://github.com/repos/octocat/Hello-World/stargazers",
"statuses_url": "https://github.com/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_url": "https://github.com/repos/octocat/Hello-World/subscribers",
"subscription_url": "https://github.com/repos/octocat/Hello-World/subscription",
"tags_url": "https://github.com/repos/octocat/Hello-World/tags",
"teams_url": "https://github.com/repos/octocat/Hello-World/teams",
"trees_url": "https://github.com/repos/octocat/Hello-World/git/trees{/sha}",
"clone_url": "https://github.com/octocat/Hello-World.git",
"mirror_url": "git:git.example.com/octocat/Hello-World",
"hooks_url": "https://github.com/repos/octocat/Hello-World/hooks",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"homepage": "https://github.com",
"language": null,
"forks_count": 9,
"stargazers_count": 80,
"watchers_count": 80,
"size": 108,
"default_branch": "master",
"open_issues_count": 0,
"is_template": true,
"topics": ["octocat", "atom", "electron", "api"],
"has_issues": true,
"has_projects": true,
"has_wiki": true,
"has_pages": false,
"has_downloads": true,
"archived": false,
"disabled": false,
"visibility": "public",
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"allow_rebase_merge": true,
"template_repository": null,
"temp_clone_token": "ABTLWHOULUVAXGTRYU7OC2876QJ2O",
"allow_squash_merge": true,
"allow_auto_merge": false,
"delete_branch_on_merge": true,
"allow_merge_commit": true,
"subscribers_count": 42,
"network_count": 0,
"license": {
"key": "mit",
"name": "MIT License",
"url": "https://github.com/licenses/mit",
"spdx_id": "MIT",
"node_id": "MDc6TGljZW5zZW1pdA==",
"html_url": "https://github.com/licenses/mit"
},
"forks": 1,
"open_issues": 1,
"watchers": 1
}
]
}
Loading