@red-hat-developer-hub/backstage-plugin-bulk-import-backend 5.0.1
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 +115 -0
- package/README.md +161 -0
- package/app-config.yaml +0 -0
- package/config.d.ts +17 -0
- package/dist/catalog/catalogHttpClient.cjs.js +284 -0
- package/dist/catalog/catalogHttpClient.cjs.js.map +1 -0
- package/dist/catalog/catalogInfoGenerator.cjs.js +60 -0
- package/dist/catalog/catalogInfoGenerator.cjs.js.map +1 -0
- package/dist/catalog/catalogUtils.cjs.js +34 -0
- package/dist/catalog/catalogUtils.cjs.js.map +1 -0
- package/dist/generated/openapidocument.cjs.js +1168 -0
- package/dist/generated/openapidocument.cjs.js.map +1 -0
- package/dist/github/GithubAppManager.cjs.js +395 -0
- package/dist/github/GithubAppManager.cjs.js.map +1 -0
- package/dist/github/githubApiService.cjs.js +659 -0
- package/dist/github/githubApiService.cjs.js.map +1 -0
- package/dist/github/types.cjs.js +8 -0
- package/dist/github/types.cjs.js.map +1 -0
- package/dist/github/utils/ghUtils.cjs.js +103 -0
- package/dist/github/utils/ghUtils.cjs.js.map +1 -0
- package/dist/github/utils/orgUtils.cjs.js +151 -0
- package/dist/github/utils/orgUtils.cjs.js.map +1 -0
- package/dist/github/utils/prUtils.cjs.js +85 -0
- package/dist/github/utils/prUtils.cjs.js.map +1 -0
- package/dist/github/utils/repoUtils.cjs.js +307 -0
- package/dist/github/utils/repoUtils.cjs.js.map +1 -0
- package/dist/github/utils/utils.cjs.js +206 -0
- package/dist/github/utils/utils.cjs.js.map +1 -0
- package/dist/helpers/auditLogUtils.cjs.js +112 -0
- package/dist/helpers/auditLogUtils.cjs.js.map +1 -0
- package/dist/helpers/auth.cjs.js +36 -0
- package/dist/helpers/auth.cjs.js.map +1 -0
- package/dist/helpers/loggingUtils.cjs.js +19 -0
- package/dist/helpers/loggingUtils.cjs.js.map +1 -0
- package/dist/helpers/pagination.cjs.js +19 -0
- package/dist/helpers/pagination.cjs.js.map +1 -0
- package/dist/index.cjs.js +12 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/plugin.cjs.js +54 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/service/handlers/handlers.cjs.js +8 -0
- package/dist/service/handlers/handlers.cjs.js.map +1 -0
- package/dist/service/handlers/import/bulkImports.cjs.js +551 -0
- package/dist/service/handlers/import/bulkImports.cjs.js.map +1 -0
- package/dist/service/handlers/import/importStatus.cjs.js +49 -0
- package/dist/service/handlers/import/importStatus.cjs.js.map +1 -0
- package/dist/service/handlers/organization/organizations.cjs.js +77 -0
- package/dist/service/handlers/organization/organizations.cjs.js.map +1 -0
- package/dist/service/handlers/ping/ping.cjs.js +12 -0
- package/dist/service/handlers/ping/ping.cjs.js.map +1 -0
- package/dist/service/handlers/repository/repositories.cjs.js +99 -0
- package/dist/service/handlers/repository/repositories.cjs.js.map +1 -0
- package/dist/service/router.cjs.js +324 -0
- package/dist/service/router.cjs.js.map +1 -0
- package/package.json +110 -0
|
@@ -0,0 +1,1168 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const OPENAPI = `
|
|
4
|
+
{
|
|
5
|
+
"openapi": "3.1.0",
|
|
6
|
+
"info": {
|
|
7
|
+
"version": "1.0",
|
|
8
|
+
"title": "Bulk Import Backend",
|
|
9
|
+
"description": "The Bulk Import Backend APIs allow users to bulk import repositories into the Backstage catalog from remote sources such as Git."
|
|
10
|
+
},
|
|
11
|
+
"servers": [
|
|
12
|
+
{
|
|
13
|
+
"url": "{protocol}://{host}:{port}/{basePath}",
|
|
14
|
+
"variables": {
|
|
15
|
+
"protocol": {
|
|
16
|
+
"enum": [
|
|
17
|
+
"http",
|
|
18
|
+
"https"
|
|
19
|
+
],
|
|
20
|
+
"default": "http"
|
|
21
|
+
},
|
|
22
|
+
"host": {
|
|
23
|
+
"default": "localhost"
|
|
24
|
+
},
|
|
25
|
+
"port": {
|
|
26
|
+
"default": "7007"
|
|
27
|
+
},
|
|
28
|
+
"basePath": {
|
|
29
|
+
"default": "api/bulk-import"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"paths": {
|
|
35
|
+
"/ping": {
|
|
36
|
+
"get": {
|
|
37
|
+
"operationId": "ping",
|
|
38
|
+
"summary": "Check the health of the Bulk Import backend router",
|
|
39
|
+
"tags": [
|
|
40
|
+
"Management"
|
|
41
|
+
],
|
|
42
|
+
"responses": {
|
|
43
|
+
"200": {
|
|
44
|
+
"description": "The backend router for the Bulk Import backend is up and running",
|
|
45
|
+
"content": {
|
|
46
|
+
"application/json": {
|
|
47
|
+
"schema": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": {
|
|
50
|
+
"status": {
|
|
51
|
+
"enum": [
|
|
52
|
+
"ok"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"example": {
|
|
58
|
+
"status": "ok"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"/organizations": {
|
|
67
|
+
"get": {
|
|
68
|
+
"operationId": "findAllOrganizations",
|
|
69
|
+
"summary": "Fetch Organizations accessible by Backstage Github Integrations",
|
|
70
|
+
"security": [
|
|
71
|
+
{
|
|
72
|
+
"BearerAuth": []
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"tags": [
|
|
76
|
+
"Organization"
|
|
77
|
+
],
|
|
78
|
+
"parameters": [
|
|
79
|
+
{
|
|
80
|
+
"$ref": "#/components/parameters/pagePerIntegrationQueryParam"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"$ref": "#/components/parameters/sizePerIntegrationQueryParam"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"$ref": "#/components/parameters/searchQueryParam"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"responses": {
|
|
90
|
+
"200": {
|
|
91
|
+
"description": "Organization list was fetched successfully with no errors",
|
|
92
|
+
"content": {
|
|
93
|
+
"application/json": {
|
|
94
|
+
"schema": {
|
|
95
|
+
"$ref": "#/components/schemas/OrganizationList"
|
|
96
|
+
},
|
|
97
|
+
"examples": {
|
|
98
|
+
"multipleRepos": {
|
|
99
|
+
"$ref": "#/components/examples/multipleOrgs"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"500": {
|
|
106
|
+
"description": "Generic error when there are errors and no Organization is returned",
|
|
107
|
+
"content": {
|
|
108
|
+
"application/json": {
|
|
109
|
+
"schema": {
|
|
110
|
+
"$ref": "#/components/schemas/OrganizationList"
|
|
111
|
+
},
|
|
112
|
+
"examples": {
|
|
113
|
+
"repositoryListErrors": {
|
|
114
|
+
"$ref": "#/components/examples/orgListErrors"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"/organizations/{organizationName}/repositories": {
|
|
124
|
+
"get": {
|
|
125
|
+
"operationId": "findRepositoriesByOrganization",
|
|
126
|
+
"summary": "Fetch Repositories in the specified GitHub organization, provided it is accessible by any of the configured GitHub Integrations.",
|
|
127
|
+
"security": [
|
|
128
|
+
{
|
|
129
|
+
"BearerAuth": []
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"tags": [
|
|
133
|
+
"Organization"
|
|
134
|
+
],
|
|
135
|
+
"parameters": [
|
|
136
|
+
{
|
|
137
|
+
"in": "path",
|
|
138
|
+
"name": "organizationName",
|
|
139
|
+
"description": "Organization name",
|
|
140
|
+
"required": true,
|
|
141
|
+
"schema": {
|
|
142
|
+
"type": "string"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"in": "query",
|
|
147
|
+
"name": "checkImportStatus",
|
|
148
|
+
"description": "whether to return import status. Note that this might incur a performance penalty because the import status is computed for each repository.",
|
|
149
|
+
"schema": {
|
|
150
|
+
"type": "boolean",
|
|
151
|
+
"default": "false"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"$ref": "#/components/parameters/pagePerIntegrationQueryParam"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"$ref": "#/components/parameters/sizePerIntegrationQueryParam"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"$ref": "#/components/parameters/searchQueryParam"
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"responses": {
|
|
165
|
+
"200": {
|
|
166
|
+
"description": "Org Repository list was fetched successfully with no errors",
|
|
167
|
+
"content": {
|
|
168
|
+
"application/json": {
|
|
169
|
+
"schema": {
|
|
170
|
+
"$ref": "#/components/schemas/RepositoryList"
|
|
171
|
+
},
|
|
172
|
+
"examples": {
|
|
173
|
+
"multipleRepos": {
|
|
174
|
+
"$ref": "#/components/examples/multipleRepos"
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"500": {
|
|
181
|
+
"description": "Generic error when there are errors and no Org Repository is returned",
|
|
182
|
+
"content": {
|
|
183
|
+
"application/json": {
|
|
184
|
+
"schema": {
|
|
185
|
+
"$ref": "#/components/schemas/RepositoryList"
|
|
186
|
+
},
|
|
187
|
+
"examples": {
|
|
188
|
+
"repositoryListErrors": {
|
|
189
|
+
"$ref": "#/components/examples/repositoryListErrors"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"/repositories": {
|
|
199
|
+
"get": {
|
|
200
|
+
"operationId": "findAllRepositories",
|
|
201
|
+
"summary": "Fetch Organization Repositories accessible by Backstage Github Integrations",
|
|
202
|
+
"security": [
|
|
203
|
+
{
|
|
204
|
+
"BearerAuth": []
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"tags": [
|
|
208
|
+
"Repository"
|
|
209
|
+
],
|
|
210
|
+
"parameters": [
|
|
211
|
+
{
|
|
212
|
+
"in": "query",
|
|
213
|
+
"name": "checkImportStatus",
|
|
214
|
+
"description": "whether to return import status. Note that this might incur a performance penalty because the import status is computed for each repository.",
|
|
215
|
+
"schema": {
|
|
216
|
+
"type": "boolean",
|
|
217
|
+
"default": "false"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"$ref": "#/components/parameters/pagePerIntegrationQueryParam"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"$ref": "#/components/parameters/sizePerIntegrationQueryParam"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"$ref": "#/components/parameters/searchQueryParam"
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"responses": {
|
|
231
|
+
"200": {
|
|
232
|
+
"description": "Repository list was fetched successfully with no errors",
|
|
233
|
+
"content": {
|
|
234
|
+
"application/json": {
|
|
235
|
+
"schema": {
|
|
236
|
+
"$ref": "#/components/schemas/RepositoryList"
|
|
237
|
+
},
|
|
238
|
+
"examples": {
|
|
239
|
+
"multipleRepos": {
|
|
240
|
+
"$ref": "#/components/examples/multipleRepos"
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"500": {
|
|
247
|
+
"description": "Generic error when there are errors and no repository is returned",
|
|
248
|
+
"content": {
|
|
249
|
+
"application/json": {
|
|
250
|
+
"schema": {
|
|
251
|
+
"$ref": "#/components/schemas/RepositoryList"
|
|
252
|
+
},
|
|
253
|
+
"examples": {
|
|
254
|
+
"repositoryListErrors": {
|
|
255
|
+
"$ref": "#/components/examples/repositoryListErrors"
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"/imports": {
|
|
265
|
+
"get": {
|
|
266
|
+
"operationId": "findAllImports",
|
|
267
|
+
"summary": "Fetch Import Jobs",
|
|
268
|
+
"security": [
|
|
269
|
+
{
|
|
270
|
+
"BearerAuth": []
|
|
271
|
+
}
|
|
272
|
+
],
|
|
273
|
+
"tags": [
|
|
274
|
+
"Import"
|
|
275
|
+
],
|
|
276
|
+
"parameters": [
|
|
277
|
+
{
|
|
278
|
+
"$ref": "#/components/parameters/apiVersionHeaderParam"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"$ref": "#/components/parameters/pagePerIntegrationQueryParamDeprecated"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"$ref": "#/components/parameters/sizePerIntegrationQueryParamDeprecated"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"$ref": "#/components/parameters/pageQueryParam"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"$ref": "#/components/parameters/sizeQueryParam"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"$ref": "#/components/parameters/searchQueryParam"
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
"responses": {
|
|
297
|
+
"200": {
|
|
298
|
+
"description": "Import Job list was fetched successfully with no errors",
|
|
299
|
+
"content": {
|
|
300
|
+
"application/json": {
|
|
301
|
+
"schema": {
|
|
302
|
+
"oneOf": [
|
|
303
|
+
{
|
|
304
|
+
"type": "array",
|
|
305
|
+
"items": {
|
|
306
|
+
"$ref": "#/components/schemas/Import"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"$ref": "#/components/schemas/ImportJobListV2"
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
},
|
|
314
|
+
"examples": {
|
|
315
|
+
"twoImports": {
|
|
316
|
+
"$ref": "#/components/examples/twoImports"
|
|
317
|
+
},
|
|
318
|
+
"multipleImportJobsV2": {
|
|
319
|
+
"$ref": "#/components/examples/multipleImportJobsV2"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"500": {
|
|
326
|
+
"description": "Generic error when there are errors and no Import Job is returned",
|
|
327
|
+
"content": {
|
|
328
|
+
"application/json": {
|
|
329
|
+
"schema": {
|
|
330
|
+
"oneOf": [
|
|
331
|
+
{
|
|
332
|
+
"type": "string",
|
|
333
|
+
"description": "Generic error"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"$ref": "#/components/schemas/ImportJobListV2"
|
|
337
|
+
}
|
|
338
|
+
]
|
|
339
|
+
},
|
|
340
|
+
"examples": {
|
|
341
|
+
"repositoryListErrors": {
|
|
342
|
+
"$ref": "#/components/examples/importJobListErrors"
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"post": {
|
|
351
|
+
"operationId": "createImportJobs",
|
|
352
|
+
"summary": "Submit Import Jobs",
|
|
353
|
+
"security": [
|
|
354
|
+
{
|
|
355
|
+
"BearerAuth": []
|
|
356
|
+
}
|
|
357
|
+
],
|
|
358
|
+
"tags": [
|
|
359
|
+
"Import"
|
|
360
|
+
],
|
|
361
|
+
"parameters": [
|
|
362
|
+
{
|
|
363
|
+
"in": "query",
|
|
364
|
+
"name": "dryRun",
|
|
365
|
+
"description": "whether to perform a dry-run to check if entity name collisions would occur in the catalog",
|
|
366
|
+
"schema": {
|
|
367
|
+
"type": "boolean",
|
|
368
|
+
"default": "false"
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
"requestBody": {
|
|
373
|
+
"description": "List of Import jobs to create",
|
|
374
|
+
"required": true,
|
|
375
|
+
"content": {
|
|
376
|
+
"application/json": {
|
|
377
|
+
"schema": {
|
|
378
|
+
"type": "array",
|
|
379
|
+
"items": {
|
|
380
|
+
"$ref": "#/components/schemas/ImportRequest"
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"examples": {
|
|
384
|
+
"multipleImportRequests": {
|
|
385
|
+
"$ref": "#/components/examples/multipleImportRequests"
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
"responses": {
|
|
392
|
+
"202": {
|
|
393
|
+
"description": "Import Jobs request was submitted successfully to the API. Check the status in each item of the response body list to see their individual status.",
|
|
394
|
+
"content": {
|
|
395
|
+
"application/json": {
|
|
396
|
+
"schema": {
|
|
397
|
+
"type": "array",
|
|
398
|
+
"items": {
|
|
399
|
+
"$ref": "#/components/schemas/Import"
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"examples": {
|
|
403
|
+
"twoImports": {
|
|
404
|
+
"$ref": "#/components/examples/twoImportJobs"
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"/import/by-repo": {
|
|
414
|
+
"get": {
|
|
415
|
+
"operationId": "findImportStatusByRepo",
|
|
416
|
+
"summary": "Get Import Status by repository",
|
|
417
|
+
"security": [
|
|
418
|
+
{
|
|
419
|
+
"BearerAuth": []
|
|
420
|
+
}
|
|
421
|
+
],
|
|
422
|
+
"tags": [
|
|
423
|
+
"Import"
|
|
424
|
+
],
|
|
425
|
+
"parameters": [
|
|
426
|
+
{
|
|
427
|
+
"in": "query",
|
|
428
|
+
"name": "repo",
|
|
429
|
+
"description": "the full URL to the repo",
|
|
430
|
+
"schema": {
|
|
431
|
+
"type": "string"
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"in": "query",
|
|
436
|
+
"name": "defaultBranch",
|
|
437
|
+
"description": "the name of the default branch",
|
|
438
|
+
"schema": {
|
|
439
|
+
"type": "string",
|
|
440
|
+
"default": "main"
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
],
|
|
444
|
+
"responses": {
|
|
445
|
+
"200": {
|
|
446
|
+
"description": "Import Job status was determined successfully with no errors",
|
|
447
|
+
"content": {
|
|
448
|
+
"application/json": {
|
|
449
|
+
"schema": {
|
|
450
|
+
"$ref": "#/components/schemas/Import"
|
|
451
|
+
},
|
|
452
|
+
"examples": {
|
|
453
|
+
"singleImportStatusForRepo": {
|
|
454
|
+
"$ref": "#/components/examples/singleImportStatusForRepo"
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
"500": {
|
|
461
|
+
"description": "Generic error"
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"delete": {
|
|
466
|
+
"operationId": "deleteImportByRepo",
|
|
467
|
+
"summary": "Delete Import by repository",
|
|
468
|
+
"security": [
|
|
469
|
+
{
|
|
470
|
+
"BearerAuth": []
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
"tags": [
|
|
474
|
+
"Import"
|
|
475
|
+
],
|
|
476
|
+
"parameters": [
|
|
477
|
+
{
|
|
478
|
+
"in": "query",
|
|
479
|
+
"name": "repo",
|
|
480
|
+
"description": "the full URL to the repo",
|
|
481
|
+
"schema": {
|
|
482
|
+
"type": "string"
|
|
483
|
+
}
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
"in": "query",
|
|
487
|
+
"name": "defaultBranch",
|
|
488
|
+
"description": "the name of the default branch",
|
|
489
|
+
"schema": {
|
|
490
|
+
"type": "string",
|
|
491
|
+
"default": "main"
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
],
|
|
495
|
+
"responses": {
|
|
496
|
+
"204": {
|
|
497
|
+
"description": "Import Job was successfully delete with no errors"
|
|
498
|
+
},
|
|
499
|
+
"500": {
|
|
500
|
+
"description": "Generic error"
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
"components": {
|
|
507
|
+
"parameters": {
|
|
508
|
+
"apiVersionHeaderParam": {
|
|
509
|
+
"in": "header",
|
|
510
|
+
"name": "api-version",
|
|
511
|
+
"description": "API version.\\n\\n## Changelog\\n\\n### v1 (default)\\nInitial version\\n#### Deprecations\\n* GET /imports\\n * Deprecation of 'pagePerIntegration' and 'sizePerIntegration' query parameters and introduction of new 'page' and 'size' parameters\\n * 'page' takes precedence over 'pagePerIntegration' if both are passed\\n * 'size' takes precedence over 'sizePerIntegration' if both are passed\\n\\n### v2\\n#### Breaking changes\\n* GET /imports\\n * Query parameters:\\n * 'pagePerIntegration' is ignored in favor of 'page'\\n * 'sizePerIntegration' is ignored in favor of 'size'\\n * Response structure changed to include pagination info: instead of returning a simple list of Imports, the response is now an object containing the following fields:\\n * 'imports': the list of Imports\\n * 'page': the page requested\\n * 'size': the requested number of Imports requested per page\\n * 'totalCount': the total count of Imports\\n",
|
|
512
|
+
"schema": {
|
|
513
|
+
"type": "string",
|
|
514
|
+
"enum": [
|
|
515
|
+
"v1",
|
|
516
|
+
"v2"
|
|
517
|
+
],
|
|
518
|
+
"default": "v1"
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
"pagePerIntegrationQueryParam": {
|
|
522
|
+
"in": "query",
|
|
523
|
+
"name": "pagePerIntegration",
|
|
524
|
+
"description": "the page number for each Integration",
|
|
525
|
+
"schema": {
|
|
526
|
+
"type": "integer",
|
|
527
|
+
"default": 1
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
"sizePerIntegrationQueryParam": {
|
|
531
|
+
"in": "query",
|
|
532
|
+
"name": "sizePerIntegration",
|
|
533
|
+
"description": "the number of items per Integration to return per page",
|
|
534
|
+
"schema": {
|
|
535
|
+
"type": "integer",
|
|
536
|
+
"default": 20
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
"pagePerIntegrationQueryParamDeprecated": {
|
|
540
|
+
"in": "query",
|
|
541
|
+
"name": "pagePerIntegration",
|
|
542
|
+
"description": "the page number for each Integration. **Deprecated**. Use the 'page' query parameter instead.",
|
|
543
|
+
"deprecated": true,
|
|
544
|
+
"schema": {
|
|
545
|
+
"type": "integer",
|
|
546
|
+
"default": 1
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
"sizePerIntegrationQueryParamDeprecated": {
|
|
550
|
+
"in": "query",
|
|
551
|
+
"name": "sizePerIntegration",
|
|
552
|
+
"description": "the number of items per Integration to return per page. **Deprecated**. Use the 'size' query parameter instead.",
|
|
553
|
+
"deprecated": true,
|
|
554
|
+
"schema": {
|
|
555
|
+
"type": "integer",
|
|
556
|
+
"default": 20
|
|
557
|
+
}
|
|
558
|
+
},
|
|
559
|
+
"searchQueryParam": {
|
|
560
|
+
"in": "query",
|
|
561
|
+
"name": "search",
|
|
562
|
+
"description": "returns only the items that match the search string",
|
|
563
|
+
"schema": {
|
|
564
|
+
"type": "string"
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
"pageQueryParam": {
|
|
568
|
+
"in": "query",
|
|
569
|
+
"name": "page",
|
|
570
|
+
"description": "the requested page number",
|
|
571
|
+
"schema": {
|
|
572
|
+
"type": "integer",
|
|
573
|
+
"default": 1
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
"sizeQueryParam": {
|
|
577
|
+
"in": "query",
|
|
578
|
+
"name": "size",
|
|
579
|
+
"description": "the number of items to return per page",
|
|
580
|
+
"schema": {
|
|
581
|
+
"type": "integer",
|
|
582
|
+
"default": 20
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
"schemas": {
|
|
587
|
+
"OrganizationList": {
|
|
588
|
+
"title": "Organization List",
|
|
589
|
+
"type": "object",
|
|
590
|
+
"properties": {
|
|
591
|
+
"organizations": {
|
|
592
|
+
"type": "array",
|
|
593
|
+
"items": {
|
|
594
|
+
"$ref": "#/components/schemas/Organization"
|
|
595
|
+
}
|
|
596
|
+
},
|
|
597
|
+
"errors": {
|
|
598
|
+
"type": "array",
|
|
599
|
+
"items": {
|
|
600
|
+
"type": "string"
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
"totalCount": {
|
|
604
|
+
"type": "integer"
|
|
605
|
+
},
|
|
606
|
+
"pagePerIntegration": {
|
|
607
|
+
"type": "integer"
|
|
608
|
+
},
|
|
609
|
+
"sizePerIntegration": {
|
|
610
|
+
"type": "integer"
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
},
|
|
614
|
+
"Organization": {
|
|
615
|
+
"title": "Organization",
|
|
616
|
+
"type": "object",
|
|
617
|
+
"properties": {
|
|
618
|
+
"id": {
|
|
619
|
+
"type": "string",
|
|
620
|
+
"description": "unique identifier"
|
|
621
|
+
},
|
|
622
|
+
"name": {
|
|
623
|
+
"type": "string",
|
|
624
|
+
"description": "organization name"
|
|
625
|
+
},
|
|
626
|
+
"description": {
|
|
627
|
+
"type": "string",
|
|
628
|
+
"description": "organization description"
|
|
629
|
+
},
|
|
630
|
+
"url": {
|
|
631
|
+
"type": "string",
|
|
632
|
+
"description": "organization URL"
|
|
633
|
+
},
|
|
634
|
+
"totalRepoCount": {
|
|
635
|
+
"type": "number",
|
|
636
|
+
"description": "total number of repositories in this Organization"
|
|
637
|
+
},
|
|
638
|
+
"errors": {
|
|
639
|
+
"type": "array",
|
|
640
|
+
"items": {
|
|
641
|
+
"type": "string"
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
"RepositoryList": {
|
|
647
|
+
"title": "Repository List",
|
|
648
|
+
"type": "object",
|
|
649
|
+
"properties": {
|
|
650
|
+
"repositories": {
|
|
651
|
+
"type": "array",
|
|
652
|
+
"items": {
|
|
653
|
+
"$ref": "#/components/schemas/Repository"
|
|
654
|
+
}
|
|
655
|
+
},
|
|
656
|
+
"errors": {
|
|
657
|
+
"type": "array",
|
|
658
|
+
"items": {
|
|
659
|
+
"type": "string"
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
"totalCount": {
|
|
663
|
+
"type": "integer"
|
|
664
|
+
},
|
|
665
|
+
"pagePerIntegration": {
|
|
666
|
+
"type": "integer"
|
|
667
|
+
},
|
|
668
|
+
"sizePerIntegration": {
|
|
669
|
+
"type": "integer"
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
"Repository": {
|
|
674
|
+
"title": "Repository",
|
|
675
|
+
"type": "object",
|
|
676
|
+
"properties": {
|
|
677
|
+
"id": {
|
|
678
|
+
"type": "string",
|
|
679
|
+
"description": "unique identifier"
|
|
680
|
+
},
|
|
681
|
+
"name": {
|
|
682
|
+
"type": "string",
|
|
683
|
+
"description": "repository name"
|
|
684
|
+
},
|
|
685
|
+
"url": {
|
|
686
|
+
"type": "string",
|
|
687
|
+
"description": "repository URL"
|
|
688
|
+
},
|
|
689
|
+
"organization": {
|
|
690
|
+
"type": "string",
|
|
691
|
+
"description": "organization which the repository is part of"
|
|
692
|
+
},
|
|
693
|
+
"importStatus": {
|
|
694
|
+
"$ref": "#/components/schemas/ImportStatus"
|
|
695
|
+
},
|
|
696
|
+
"defaultBranch": {
|
|
697
|
+
"type": "string",
|
|
698
|
+
"description": "default branch"
|
|
699
|
+
},
|
|
700
|
+
"lastUpdate": {
|
|
701
|
+
"type": "string",
|
|
702
|
+
"format": "date-time"
|
|
703
|
+
},
|
|
704
|
+
"errors": {
|
|
705
|
+
"type": "array",
|
|
706
|
+
"items": {
|
|
707
|
+
"type": "string"
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
"ApprovalTool": {
|
|
713
|
+
"type": "string",
|
|
714
|
+
"enum": [
|
|
715
|
+
"GIT",
|
|
716
|
+
"SERVICENOW"
|
|
717
|
+
]
|
|
718
|
+
},
|
|
719
|
+
"ImportStatus": {
|
|
720
|
+
"type": "string",
|
|
721
|
+
"nullable": true,
|
|
722
|
+
"description": "Import Job status",
|
|
723
|
+
"enum": [
|
|
724
|
+
"ADDED",
|
|
725
|
+
"WAIT_PR_APPROVAL",
|
|
726
|
+
"PR_ERROR",
|
|
727
|
+
null
|
|
728
|
+
]
|
|
729
|
+
},
|
|
730
|
+
"ImportJobListV2": {
|
|
731
|
+
"title": "Import Job List",
|
|
732
|
+
"type": "object",
|
|
733
|
+
"properties": {
|
|
734
|
+
"imports": {
|
|
735
|
+
"type": "array",
|
|
736
|
+
"items": {
|
|
737
|
+
"$ref": "#/components/schemas/Import"
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
"errors": {
|
|
741
|
+
"type": "array",
|
|
742
|
+
"items": {
|
|
743
|
+
"type": "string"
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
"totalCount": {
|
|
747
|
+
"type": "integer"
|
|
748
|
+
},
|
|
749
|
+
"page": {
|
|
750
|
+
"type": "integer"
|
|
751
|
+
},
|
|
752
|
+
"size": {
|
|
753
|
+
"type": "integer"
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
"Import": {
|
|
758
|
+
"title": "Import Job",
|
|
759
|
+
"type": "object",
|
|
760
|
+
"properties": {
|
|
761
|
+
"id": {
|
|
762
|
+
"type": "string"
|
|
763
|
+
},
|
|
764
|
+
"status": {
|
|
765
|
+
"$ref": "#/components/schemas/ImportStatus"
|
|
766
|
+
},
|
|
767
|
+
"catalogEntityName": {
|
|
768
|
+
"type": "string",
|
|
769
|
+
"description": "Specified entity name in the catalog. Filled only in response for dry-run import requests."
|
|
770
|
+
},
|
|
771
|
+
"lastUpdate": {
|
|
772
|
+
"type": "string",
|
|
773
|
+
"format": "date-time"
|
|
774
|
+
},
|
|
775
|
+
"errors": {
|
|
776
|
+
"type": "array",
|
|
777
|
+
"items": {
|
|
778
|
+
"type": "string"
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
"approvalTool": {
|
|
782
|
+
"$ref": "#/components/schemas/ApprovalTool"
|
|
783
|
+
},
|
|
784
|
+
"repository": {
|
|
785
|
+
"$ref": "#/components/schemas/Repository"
|
|
786
|
+
},
|
|
787
|
+
"github": {
|
|
788
|
+
"type": "object",
|
|
789
|
+
"description": "GitHub details. Applicable if approvalTool is git.",
|
|
790
|
+
"properties": {
|
|
791
|
+
"pullRequest": {
|
|
792
|
+
"type": "object",
|
|
793
|
+
"properties": {
|
|
794
|
+
"url": {
|
|
795
|
+
"type": "string",
|
|
796
|
+
"description": "URL of the Pull Request"
|
|
797
|
+
},
|
|
798
|
+
"number": {
|
|
799
|
+
"type": "number",
|
|
800
|
+
"description": "Pull Request number"
|
|
801
|
+
},
|
|
802
|
+
"title": {
|
|
803
|
+
"type": "string",
|
|
804
|
+
"description": "title of the Pull Request"
|
|
805
|
+
},
|
|
806
|
+
"body": {
|
|
807
|
+
"type": "string",
|
|
808
|
+
"description": "body of the Pull Request"
|
|
809
|
+
},
|
|
810
|
+
"catalogInfoContent": {
|
|
811
|
+
"type": "string",
|
|
812
|
+
"description": "content of the catalog-info.yaml as fetched from the Pull Request."
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
"ImportRequest": {
|
|
821
|
+
"title": "Import Job request",
|
|
822
|
+
"type": "object",
|
|
823
|
+
"required": [
|
|
824
|
+
"repository"
|
|
825
|
+
],
|
|
826
|
+
"properties": {
|
|
827
|
+
"approvalTool": {
|
|
828
|
+
"$ref": "#/components/schemas/ApprovalTool"
|
|
829
|
+
},
|
|
830
|
+
"catalogEntityName": {
|
|
831
|
+
"type": "string",
|
|
832
|
+
"description": "Expected Entity name in the catalog. Relevant only if the 'dryRun' query parameter is set to 'true'."
|
|
833
|
+
},
|
|
834
|
+
"codeOwnersFileAsEntityOwner": {
|
|
835
|
+
"type": "boolean",
|
|
836
|
+
"description": "Whether the CODEOWNERS file will be used as entity owner. Only relevant for dry-run requests. If set to 'false', the corresponding dry-run check will be skipped."
|
|
837
|
+
},
|
|
838
|
+
"repository": {
|
|
839
|
+
"type": "object",
|
|
840
|
+
"required": [
|
|
841
|
+
"url"
|
|
842
|
+
],
|
|
843
|
+
"properties": {
|
|
844
|
+
"name": {
|
|
845
|
+
"type": "string",
|
|
846
|
+
"description": "repository name"
|
|
847
|
+
},
|
|
848
|
+
"url": {
|
|
849
|
+
"type": "string",
|
|
850
|
+
"description": "repository URL"
|
|
851
|
+
},
|
|
852
|
+
"organization": {
|
|
853
|
+
"type": "string",
|
|
854
|
+
"description": "organization which the repository is part of"
|
|
855
|
+
},
|
|
856
|
+
"defaultBranch": {
|
|
857
|
+
"type": "string",
|
|
858
|
+
"description": "default branch"
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
},
|
|
862
|
+
"catalogInfoContent": {
|
|
863
|
+
"type": "string",
|
|
864
|
+
"description": "content of the catalog-info.yaml to include in the import Pull Request."
|
|
865
|
+
},
|
|
866
|
+
"github": {
|
|
867
|
+
"type": "object",
|
|
868
|
+
"description": "GitHub details. Applicable if approvalTool is git.",
|
|
869
|
+
"properties": {
|
|
870
|
+
"pullRequest": {
|
|
871
|
+
"type": "object",
|
|
872
|
+
"description": "Pull Request details. Applicable if approvalTool is git.",
|
|
873
|
+
"properties": {
|
|
874
|
+
"title": {
|
|
875
|
+
"type": "string",
|
|
876
|
+
"description": "title of the Pull Request"
|
|
877
|
+
},
|
|
878
|
+
"body": {
|
|
879
|
+
"type": "string",
|
|
880
|
+
"description": "body of the Pull Request"
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
},
|
|
889
|
+
"securitySchemes": {
|
|
890
|
+
"BearerAuth": {
|
|
891
|
+
"type": "http",
|
|
892
|
+
"scheme": "bearer",
|
|
893
|
+
"bearerFormat": "JWT",
|
|
894
|
+
"description": "Backstage Permissions Framework JWT"
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
"examples": {
|
|
898
|
+
"multipleOrgs": {
|
|
899
|
+
"summary": "Multiple organizations",
|
|
900
|
+
"value": {
|
|
901
|
+
"errors": [],
|
|
902
|
+
"organizations": [
|
|
903
|
+
{
|
|
904
|
+
"id": "unique-org-id-1",
|
|
905
|
+
"name": "pet-org",
|
|
906
|
+
"url": "https://github.com/pet-org",
|
|
907
|
+
"description": "A great Pet Org",
|
|
908
|
+
"totalRepoCount": 10
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
"id": "unique-org-id-2",
|
|
912
|
+
"name": "org-zero",
|
|
913
|
+
"url": "https://ghe.example.com/org-zero",
|
|
914
|
+
"totalRepoCount": 0
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
"id": "unique-id-2",
|
|
918
|
+
"name": "org-one",
|
|
919
|
+
"url": "https://ghe.example.com/org-one",
|
|
920
|
+
"description": "Org One description",
|
|
921
|
+
"totalRepoCount": 1234
|
|
922
|
+
}
|
|
923
|
+
]
|
|
924
|
+
}
|
|
925
|
+
},
|
|
926
|
+
"orgListErrors": {
|
|
927
|
+
"summary": "Errors when listing organizations",
|
|
928
|
+
"value": {
|
|
929
|
+
"errors": [
|
|
930
|
+
"Github App with ID 2 failed spectacularly"
|
|
931
|
+
],
|
|
932
|
+
"organizations": []
|
|
933
|
+
}
|
|
934
|
+
},
|
|
935
|
+
"multipleRepos": {
|
|
936
|
+
"summary": "Multiple repositories",
|
|
937
|
+
"value": {
|
|
938
|
+
"errors": [],
|
|
939
|
+
"repositories": [
|
|
940
|
+
{
|
|
941
|
+
"id": "unique-id-1",
|
|
942
|
+
"name": "pet-app",
|
|
943
|
+
"url": "https://github.com/my-org/pet-app",
|
|
944
|
+
"organization": "my-org",
|
|
945
|
+
"importStatus": "WAIT_PR_APPROVAL",
|
|
946
|
+
"defaultBranch": "main"
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
"id": "unique-id-2",
|
|
950
|
+
"name": "project-zero",
|
|
951
|
+
"url": "https://ghe.example.com/my-other-org/project-zero",
|
|
952
|
+
"organization": "my-other-org",
|
|
953
|
+
"importStatus": "PR_REJECTED",
|
|
954
|
+
"defaultBranch": "dev"
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
"id": "unique-id-2",
|
|
958
|
+
"name": "project-one",
|
|
959
|
+
"defaultBranch": "trunk",
|
|
960
|
+
"url": "https://ghe.example.com/my-other-org-2/project-one",
|
|
961
|
+
"organization": "my-other-org-2"
|
|
962
|
+
}
|
|
963
|
+
]
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
"repositoryListErrors": {
|
|
967
|
+
"summary": "Errors when listing repositories",
|
|
968
|
+
"value": {
|
|
969
|
+
"errors": [
|
|
970
|
+
"Github App with ID 2 failed spectacularly"
|
|
971
|
+
],
|
|
972
|
+
"repositories": []
|
|
973
|
+
}
|
|
974
|
+
},
|
|
975
|
+
"twoImports": {
|
|
976
|
+
"summary": "Two import job requests (V1)",
|
|
977
|
+
"value": [
|
|
978
|
+
{
|
|
979
|
+
"id": "bulk-import-id-1",
|
|
980
|
+
"status": "WAIT_PR_APPROVAL",
|
|
981
|
+
"errors": [],
|
|
982
|
+
"approvalTool": "GIT",
|
|
983
|
+
"repository": {
|
|
984
|
+
"name": "pet-app",
|
|
985
|
+
"url": "https://github.com/my-org/pet-app",
|
|
986
|
+
"organization": "my-org"
|
|
987
|
+
},
|
|
988
|
+
"github": {
|
|
989
|
+
"pullRequest": {
|
|
990
|
+
"url": "https://github.com/my-org/pet-app/pull/1",
|
|
991
|
+
"number": 1
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
"id": "bulk-import-id-2",
|
|
997
|
+
"status": "PR_REJECTED",
|
|
998
|
+
"errors": [],
|
|
999
|
+
"approvalTool": "GIT",
|
|
1000
|
+
"repository": {
|
|
1001
|
+
"name": "pet-app-test",
|
|
1002
|
+
"url": "https://github.com/my-org/pet-app-test",
|
|
1003
|
+
"organization": "my-org"
|
|
1004
|
+
},
|
|
1005
|
+
"github": {
|
|
1006
|
+
"pullRequest": {
|
|
1007
|
+
"url": "https://github.com/my-org/pet-app-test/pull/10",
|
|
1008
|
+
"number": 10
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
]
|
|
1013
|
+
},
|
|
1014
|
+
"multipleImportJobsV2": {
|
|
1015
|
+
"summary": "Two import job requests (V2)",
|
|
1016
|
+
"value": {
|
|
1017
|
+
"errors": [],
|
|
1018
|
+
"page": 1,
|
|
1019
|
+
"size": 2,
|
|
1020
|
+
"totalCount": 10,
|
|
1021
|
+
"imports": [
|
|
1022
|
+
{
|
|
1023
|
+
"id": "bulk-import-id-1",
|
|
1024
|
+
"status": "WAIT_PR_APPROVAL",
|
|
1025
|
+
"errors": [],
|
|
1026
|
+
"approvalTool": "GIT",
|
|
1027
|
+
"repository": {
|
|
1028
|
+
"name": "pet-app",
|
|
1029
|
+
"url": "https://github.com/my-org/pet-app",
|
|
1030
|
+
"organization": "my-org"
|
|
1031
|
+
},
|
|
1032
|
+
"github": {
|
|
1033
|
+
"pullRequest": {
|
|
1034
|
+
"url": "https://github.com/my-org/pet-app/pull/1",
|
|
1035
|
+
"number": 1
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
"id": "bulk-import-id-2",
|
|
1041
|
+
"status": "PR_REJECTED",
|
|
1042
|
+
"errors": [],
|
|
1043
|
+
"approvalTool": "GIT",
|
|
1044
|
+
"repository": {
|
|
1045
|
+
"name": "pet-app-test",
|
|
1046
|
+
"url": "https://github.com/my-org/pet-app-test",
|
|
1047
|
+
"organization": "my-org"
|
|
1048
|
+
},
|
|
1049
|
+
"github": {
|
|
1050
|
+
"pullRequest": {
|
|
1051
|
+
"url": "https://github.com/my-org/pet-app-test/pull/10",
|
|
1052
|
+
"number": 10
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
]
|
|
1057
|
+
}
|
|
1058
|
+
},
|
|
1059
|
+
"importJobListErrors": {
|
|
1060
|
+
"summary": "Errors when listing import jobs",
|
|
1061
|
+
"value": {
|
|
1062
|
+
"errors": [
|
|
1063
|
+
"Github App with ID xyz-123 failed spectacularly"
|
|
1064
|
+
],
|
|
1065
|
+
"imports": []
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
"twoImportJobs": {
|
|
1069
|
+
"summary": "Two import jobs",
|
|
1070
|
+
"value": [
|
|
1071
|
+
{
|
|
1072
|
+
"id": "bulk-import-id-1",
|
|
1073
|
+
"status": "WAIT_PR_APPROVAL",
|
|
1074
|
+
"errors": [],
|
|
1075
|
+
"approvalTool": "GIT",
|
|
1076
|
+
"repository": {
|
|
1077
|
+
"name": "pet-app",
|
|
1078
|
+
"url": "https://github.com/my-org/pet-app",
|
|
1079
|
+
"organization": "my-org"
|
|
1080
|
+
},
|
|
1081
|
+
"github": {
|
|
1082
|
+
"pullRequest": {
|
|
1083
|
+
"url": "https://github.com/my-org/pet-app/pull/1",
|
|
1084
|
+
"number": 1
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
"id": "bulk-import-id-2",
|
|
1090
|
+
"status": "PR_REJECTED",
|
|
1091
|
+
"errors": [],
|
|
1092
|
+
"approvalTool": "GIT",
|
|
1093
|
+
"repository": {
|
|
1094
|
+
"name": "pet-app-test",
|
|
1095
|
+
"url": "https://github.com/my-org/pet-app-test",
|
|
1096
|
+
"organization": "my-org"
|
|
1097
|
+
},
|
|
1098
|
+
"github": {
|
|
1099
|
+
"pullRequest": {
|
|
1100
|
+
"url": "https://github.com/my-org/pet-app-test/pull/10",
|
|
1101
|
+
"number": 10
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
]
|
|
1106
|
+
},
|
|
1107
|
+
"singleImportStatusForRepo": {
|
|
1108
|
+
"summary": "Single import job status for given repo",
|
|
1109
|
+
"value": {
|
|
1110
|
+
"id": "bulk-import-id-1",
|
|
1111
|
+
"status": "WAIT_PR_APPROVAL",
|
|
1112
|
+
"errors": [],
|
|
1113
|
+
"approvalTool": "GIT",
|
|
1114
|
+
"repository": {
|
|
1115
|
+
"name": "pet-app",
|
|
1116
|
+
"url": "https://github.com/my-org/pet-app",
|
|
1117
|
+
"organization": "my-org"
|
|
1118
|
+
},
|
|
1119
|
+
"github": {
|
|
1120
|
+
"pullRequest": {
|
|
1121
|
+
"url": "https://github.com/my-org/pet-app/pull/1",
|
|
1122
|
+
"number": 1
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
},
|
|
1127
|
+
"multipleImportRequests": {
|
|
1128
|
+
"summary": "Multiple import requests",
|
|
1129
|
+
"value": [
|
|
1130
|
+
{
|
|
1131
|
+
"approvalTool": "GIT",
|
|
1132
|
+
"repository": {
|
|
1133
|
+
"name": "pet-app",
|
|
1134
|
+
"url": "https://github.com/my-org/pet-app",
|
|
1135
|
+
"organization": "my-org",
|
|
1136
|
+
"defaultBranch": "main"
|
|
1137
|
+
},
|
|
1138
|
+
"github": {
|
|
1139
|
+
"pullRequest": {
|
|
1140
|
+
"title": "Add default catalog-info.yaml to import to Red Hat Developer Hub"
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
},
|
|
1144
|
+
{
|
|
1145
|
+
"approvalTool": "GIT",
|
|
1146
|
+
"repository": {
|
|
1147
|
+
"name": "project-zero",
|
|
1148
|
+
"url": "https://ghe.example.com/my-other-org/project-zero",
|
|
1149
|
+
"organization": "my-other-org",
|
|
1150
|
+
"defaultBranch": "dev"
|
|
1151
|
+
},
|
|
1152
|
+
"github": {
|
|
1153
|
+
"pullRequest": {
|
|
1154
|
+
"title": "Add custom catalog-info.yaml to import to Red Hat Developer Hub",
|
|
1155
|
+
"body": "This pull request adds a **Backstage entity metadata file** to this repository so that the component can be added to the Red Hat Developer Hub software catalog.\\n\\nAfter this pull request is merged, the component will become available.\\n\\nFor more information, read an [overview of the Backstage software catalog](https://backstage.io/docs/features/software-catalog/)."
|
|
1156
|
+
}
|
|
1157
|
+
},
|
|
1158
|
+
"catalogInfoContent": "apiVersion: backstage.io/v1alpha1\\nkind: Component\\nmetadata:\\n name: project-zero\\n annotations:\\n github.com/project-slug: my-other-org/project-zero\\n acme.com/custom-annotation: my-value\\nspec:\\n type: other\\n lifecycle: unknown\\n owner: my-other-org"
|
|
1159
|
+
}
|
|
1160
|
+
]
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
}`;
|
|
1165
|
+
const openApiDocument = JSON.parse(OPENAPI);
|
|
1166
|
+
|
|
1167
|
+
exports.openApiDocument = openApiDocument;
|
|
1168
|
+
//# sourceMappingURL=openapidocument.cjs.js.map
|