@red-hat-developer-hub/backstage-plugin-bulk-import-backend 6.6.0 → 6.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ### Dependencies
2
2
 
3
+ ## 6.7.0
4
+
5
+ ### Patch Changes
6
+
7
+ - @red-hat-developer-hub/backstage-plugin-bulk-import-common@6.7.0
8
+
3
9
  ## 6.6.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -117,6 +117,65 @@ For the RHDH instance to use the scaffolder functionality, it must be run with t
117
117
  export NODE_OPTIONS=--no-node-snapshot
118
118
  ```
119
119
 
120
+ ##### Scaffolder Template Input Parameters
121
+
122
+ The **Bulk Import plugin** executes a Scaffolder template task with specified parameters. The Scaffolder template author should use these parameters within the template.
123
+
124
+ The Bulk Import plugin parses Git repository information and provides the following parameters for the Scaffolder template task:
125
+
126
+ - **`repoUrl`** – Normalized repository URL in the format:
127
+ ${gitProviderHost}?owner=${owner}&repo=${repository-name}
128
+
129
+ **Example:** `https://github.com/redhat-developer/rhdh-plugins` will be transformed to:
130
+ `github.com?owner=redhat-developer&repo=rhdh-plugins`.
131
+
132
+ - **`name`** – Repository name.
133
+ **Example:** For `https://github.com/redhat-developer/rhdh-plugins`, the `name` will be `rhdh-plugins`.
134
+
135
+ - **`organization`** – Repository owner, which can be a user nickname or organization name.
136
+ **Example:** For `https://github.com/redhat-developer/rhdh-plugins`, `organization` will be `redhat-developer`.
137
+
138
+ - **`branchName`** – Proposed repository branch. By default, it is `bulk-import-catalog-entity`.
139
+
140
+ - **`targetBranchName`** – Default branch of the Git repository.
141
+
142
+ - **`gitProviderHost`** – Git provider host parsed from the repository URL.
143
+ **Example:** For `https://github.com/redhat-developer/rhdh-plugins`, `gitProviderHost` will be `github.com`.
144
+ This parameter allows the template author to write Git-provider-agnostic templates.
145
+
146
+ ### Example of Using Parameters in a Scaffolder Template
147
+
148
+ ```yaml
149
+ parameters:
150
+ - title: Repository Details
151
+ required:
152
+ - repoUrl
153
+ - branchName
154
+ - targetBranchName
155
+ - name
156
+ - organization
157
+ properties:
158
+ repoUrl:
159
+ type: string
160
+ title: Repository URL (Backstage format)
161
+ description: 'e.g. github.com?owner=Org&repo=repoName or gitlab.com?owner=Org&repo=repoName'
162
+ organization:
163
+ type: string
164
+ title: Owner of the Repository
165
+ name:
166
+ type: string
167
+ title: Name of the repository
168
+ branchName:
169
+ type: string
170
+ title: Branch to add the catalog entity to
171
+ targetBranchName:
172
+ type: string
173
+ title: Branch to target the PR/MR to
174
+ gitProviderHost:
175
+ type: string
176
+ title: Git provider host
177
+ ```
178
+
120
179
  ### Audit Logging
121
180
 
122
181
  Audit logging is backed by the [`@backstage/backend-plugin-api`](https://www.npmjs.com/package/@backstage/backend-plugin-api) package.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@red-hat-developer-hub/backstage-plugin-bulk-import-backend",
3
- "version": "6.6.0",
3
+ "version": "6.7.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "Apache-2.0",
@@ -63,7 +63,7 @@
63
63
  "@gitbeaker/rest": "^43.4.0",
64
64
  "@octokit/auth-app": "^6.0.3",
65
65
  "@octokit/rest": "^20.0.2",
66
- "@red-hat-developer-hub/backstage-plugin-bulk-import-common": "^1.11.0",
66
+ "@red-hat-developer-hub/backstage-plugin-bulk-import-common": "^6.7.0",
67
67
  "ajv-formats": "^3.0.1",
68
68
  "eventsource-client": "^1.2.0",
69
69
  "express": "^4.17.1",