@backstage/plugin-scaffolder-backend 1.11.0-next.2 → 1.11.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 +35 -0
- package/alpha/package.json +1 -1
- package/dist/index.cjs.js +18 -0
- package/dist/index.cjs.js.map +1 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-backend
|
|
2
2
|
|
|
3
|
+
## 1.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 0b2952ee4b: Added the option to overwrite files in the `targetPath` of the `template:fetch` action
|
|
8
|
+
- 127154930f: Renamed the export `scaffolderCatalogModule` to `catalogModuleTemplateKind` in order to follow the new recommended naming patterns of backend system items. This is technically a breaking change but in an alpha export, so take care to change your imports if you have already migrated to the new backend system.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 0ff03319be: Updated usage of `createBackendPlugin`.
|
|
13
|
+
- ad3edc402d: **Deprecations**: The following are deprecated and should instead be imported from the new package `@backstage/plugin-scaffolder-node`:
|
|
14
|
+
|
|
15
|
+
- `ActionContext`
|
|
16
|
+
- `createTemplateAction`
|
|
17
|
+
- `TaskSecrets`
|
|
18
|
+
- `TemplateAction`
|
|
19
|
+
|
|
20
|
+
- 6c70919f1a: Provide better error messaging when GitHub fails due to missing team definitions
|
|
21
|
+
- 66cf22fdc4: Updated dependency `esbuild` to `^0.17.0`.
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
- @backstage/plugin-catalog-backend@1.7.2
|
|
24
|
+
- @backstage/backend-plugin-api@0.4.0
|
|
25
|
+
- @backstage/backend-common@0.18.2
|
|
26
|
+
- @backstage/plugin-scaffolder-node@0.1.0
|
|
27
|
+
- @backstage/catalog-model@1.2.0
|
|
28
|
+
- @backstage/plugin-catalog-node@1.3.3
|
|
29
|
+
- @backstage/backend-tasks@0.4.3
|
|
30
|
+
- @backstage/catalog-client@1.3.1
|
|
31
|
+
- @backstage/config@1.0.6
|
|
32
|
+
- @backstage/errors@1.1.4
|
|
33
|
+
- @backstage/integration@1.4.2
|
|
34
|
+
- @backstage/types@1.0.2
|
|
35
|
+
- @backstage/plugin-auth-node@0.2.11
|
|
36
|
+
- @backstage/plugin-scaffolder-common@1.2.5
|
|
37
|
+
|
|
3
38
|
## 1.11.0-next.2
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -1269,6 +1269,9 @@ async function createGithubRepoWithCollaboratorsAndTopics(client, repo, owner, r
|
|
|
1269
1269
|
const user = await client.rest.users.getByUsername({
|
|
1270
1270
|
username: owner
|
|
1271
1271
|
});
|
|
1272
|
+
if (access == null ? void 0 : access.startsWith(`${owner}/`)) {
|
|
1273
|
+
await validateAccessTeam(client, access);
|
|
1274
|
+
}
|
|
1272
1275
|
const repoCreationPromise = user.data.type === "Organization" ? client.rest.repos.createInOrg({
|
|
1273
1276
|
name: repo,
|
|
1274
1277
|
org: owner,
|
|
@@ -1427,6 +1430,21 @@ function extractCollaboratorName(collaborator) {
|
|
|
1427
1430
|
return collaborator.user;
|
|
1428
1431
|
return collaborator.team;
|
|
1429
1432
|
}
|
|
1433
|
+
async function validateAccessTeam(client, access) {
|
|
1434
|
+
const [org, team_slug] = access.split("/");
|
|
1435
|
+
try {
|
|
1436
|
+
await client.rest.teams.getByName({
|
|
1437
|
+
org,
|
|
1438
|
+
team_slug
|
|
1439
|
+
});
|
|
1440
|
+
} catch (e) {
|
|
1441
|
+
if (e.response.data.message === "Not Found") {
|
|
1442
|
+
const message = `Received 'Not Found' from the API; one of org:
|
|
1443
|
+
${org} or team: ${team_slug} was not found within GitHub.`;
|
|
1444
|
+
throw new errors.NotFoundError(message);
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1430
1448
|
|
|
1431
1449
|
function createGithubActionsDispatchAction(options) {
|
|
1432
1450
|
const { integrations, githubCredentialsProvider } = options;
|