@backstage/plugin-scaffolder-backend 1.13.0-next.1 → 1.13.0-next.3
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 +51 -0
- package/alpha/package.json +1 -1
- package/dist/alpha.cjs.js +1 -1
- package/dist/alpha.d.ts +2 -2
- package/dist/cjs/{ScaffolderEntitiesProcessor-9c517d79.cjs.js → ScaffolderEntitiesProcessor-b5a2b352.cjs.js} +15 -6
- package/dist/cjs/ScaffolderEntitiesProcessor-b5a2b352.cjs.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +26 -27
- package/package.json +15 -15
- package/dist/cjs/ScaffolderEntitiesProcessor-9c517d79.cjs.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-backend
|
|
2
2
|
|
|
3
|
+
## 1.13.0-next.3
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d7c8c222e25: Allow for a commit message to differ from the PR title when publishing a GitHub pull request.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- f37a95adcd8: Stripped entity types and namespace before passing to GitHub API
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @backstage/plugin-catalog-backend@1.9.0-next.3
|
|
14
|
+
- @backstage/catalog-model@1.3.0-next.0
|
|
15
|
+
- @backstage/backend-common@0.18.4-next.2
|
|
16
|
+
- @backstage/backend-plugin-api@0.5.1-next.2
|
|
17
|
+
- @backstage/backend-tasks@0.5.1-next.2
|
|
18
|
+
- @backstage/catalog-client@1.4.1-next.1
|
|
19
|
+
- @backstage/config@1.0.7
|
|
20
|
+
- @backstage/errors@1.1.5
|
|
21
|
+
- @backstage/integration@1.4.4-next.0
|
|
22
|
+
- @backstage/types@1.0.2
|
|
23
|
+
- @backstage/plugin-auth-node@0.2.13-next.2
|
|
24
|
+
- @backstage/plugin-catalog-common@1.0.13-next.1
|
|
25
|
+
- @backstage/plugin-catalog-node@1.3.5-next.3
|
|
26
|
+
- @backstage/plugin-permission-common@0.7.5-next.0
|
|
27
|
+
- @backstage/plugin-permission-node@0.7.7-next.2
|
|
28
|
+
- @backstage/plugin-scaffolder-common@1.2.7-next.2
|
|
29
|
+
- @backstage/plugin-scaffolder-node@0.1.2-next.3
|
|
30
|
+
|
|
31
|
+
## 1.13.0-next.2
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Updated dependencies
|
|
36
|
+
- @backstage/plugin-catalog-backend@1.8.1-next.2
|
|
37
|
+
- @backstage/backend-common@0.18.4-next.2
|
|
38
|
+
- @backstage/catalog-client@1.4.1-next.0
|
|
39
|
+
- @backstage/plugin-permission-node@0.7.7-next.2
|
|
40
|
+
- @backstage/plugin-scaffolder-node@0.1.2-next.2
|
|
41
|
+
- @backstage/backend-plugin-api@0.5.1-next.2
|
|
42
|
+
- @backstage/backend-tasks@0.5.1-next.2
|
|
43
|
+
- @backstage/catalog-model@1.2.1
|
|
44
|
+
- @backstage/config@1.0.7
|
|
45
|
+
- @backstage/errors@1.1.5
|
|
46
|
+
- @backstage/integration@1.4.4-next.0
|
|
47
|
+
- @backstage/types@1.0.2
|
|
48
|
+
- @backstage/plugin-auth-node@0.2.13-next.2
|
|
49
|
+
- @backstage/plugin-catalog-common@1.0.13-next.0
|
|
50
|
+
- @backstage/plugin-catalog-node@1.3.5-next.2
|
|
51
|
+
- @backstage/plugin-permission-common@0.7.5-next.0
|
|
52
|
+
- @backstage/plugin-scaffolder-common@1.2.7-next.1
|
|
53
|
+
|
|
3
54
|
## 1.13.0-next.1
|
|
4
55
|
|
|
5
56
|
### Minor Changes
|
package/alpha/package.json
CHANGED
package/dist/alpha.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var backendPluginApi = require('@backstage/backend-plugin-api');
|
|
6
6
|
var alpha = require('@backstage/plugin-catalog-node/alpha');
|
|
7
|
-
var ScaffolderEntitiesProcessor = require('./cjs/ScaffolderEntitiesProcessor-
|
|
7
|
+
var ScaffolderEntitiesProcessor = require('./cjs/ScaffolderEntitiesProcessor-b5a2b352.cjs.js');
|
|
8
8
|
var alpha$1 = require('@backstage/plugin-scaffolder-common/alpha');
|
|
9
9
|
var pluginPermissionNode = require('@backstage/plugin-permission-node');
|
|
10
10
|
var backendCommon = require('@backstage/backend-common');
|
package/dist/alpha.d.ts
CHANGED
|
@@ -55,14 +55,14 @@ declare const scaffolderConditions: _backstage_plugin_permission_node.Conditions
|
|
|
55
55
|
*
|
|
56
56
|
* @alpha
|
|
57
57
|
*/
|
|
58
|
-
declare const createScaffolderConditionalDecision: (permission: _backstage_plugin_permission_common.ResourcePermission<"scaffolder-template">, conditions: _backstage_plugin_permission_common.PermissionCriteria<_backstage_plugin_permission_common.PermissionCondition<"scaffolder-template"
|
|
58
|
+
declare const createScaffolderConditionalDecision: (permission: _backstage_plugin_permission_common.ResourcePermission<"scaffolder-template">, conditions: _backstage_plugin_permission_common.PermissionCriteria<_backstage_plugin_permission_common.PermissionCondition<"scaffolder-template">>) => _backstage_plugin_permission_common.ConditionalPolicyDecision;
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Catalog plugin options
|
|
62
62
|
*
|
|
63
63
|
* @alpha
|
|
64
64
|
*/
|
|
65
|
-
|
|
65
|
+
type ScaffolderPluginOptions = {
|
|
66
66
|
actions?: TemplateAction<any>[];
|
|
67
67
|
taskWorkers?: number;
|
|
68
68
|
taskBroker?: TaskBroker;
|
|
@@ -258,7 +258,7 @@ function createCatalogWriteAction() {
|
|
|
258
258
|
input: zod.z.object({
|
|
259
259
|
filePath: zod.z.string().optional().describe("Defaults to catalog-info.yaml"),
|
|
260
260
|
// TODO: this should reference an zod entity validator if it existed.
|
|
261
|
-
entity: zod.z.
|
|
261
|
+
entity: zod.z.record(zod.z.any()).describe(
|
|
262
262
|
"You can provide the same values used in the Entity schema."
|
|
263
263
|
)
|
|
264
264
|
})
|
|
@@ -1396,6 +1396,9 @@ const enableBranchProtectionOnDefaultRepoBranch = async ({
|
|
|
1396
1396
|
await tryOnce();
|
|
1397
1397
|
}
|
|
1398
1398
|
};
|
|
1399
|
+
function entityRefToName(name) {
|
|
1400
|
+
return name.replace(/^.*[:/]/g, "");
|
|
1401
|
+
}
|
|
1399
1402
|
|
|
1400
1403
|
const DEFAULT_TIMEOUT_MS = 6e4;
|
|
1401
1404
|
async function getOctokitOptions(options) {
|
|
@@ -1516,13 +1519,13 @@ async function createGithubRepoWithCollaboratorsAndTopics(client, repo, owner, r
|
|
|
1516
1519
|
await client.rest.repos.addCollaborator({
|
|
1517
1520
|
owner,
|
|
1518
1521
|
repo,
|
|
1519
|
-
username: collaborator.user,
|
|
1522
|
+
username: entityRefToName(collaborator.user),
|
|
1520
1523
|
permission: collaborator.access
|
|
1521
1524
|
});
|
|
1522
1525
|
} else if ("team" in collaborator) {
|
|
1523
1526
|
await client.rest.teams.addOrUpdateRepoPermissionsInOrg({
|
|
1524
1527
|
org: owner,
|
|
1525
|
-
team_slug: collaborator.team,
|
|
1528
|
+
team_slug: entityRefToName(collaborator.team),
|
|
1526
1529
|
owner,
|
|
1527
1530
|
repo,
|
|
1528
1531
|
permission: collaborator.access
|
|
@@ -3734,6 +3737,11 @@ const createPublishGithubPullRequestAction = (options) => {
|
|
|
3734
3737
|
type: "string"
|
|
3735
3738
|
},
|
|
3736
3739
|
description: "The teams that will be added as reviewers to the pull request"
|
|
3740
|
+
},
|
|
3741
|
+
commitMessage: {
|
|
3742
|
+
type: "string",
|
|
3743
|
+
title: "Commit Message",
|
|
3744
|
+
description: "The commit message for the pull request commit"
|
|
3737
3745
|
}
|
|
3738
3746
|
}
|
|
3739
3747
|
},
|
|
@@ -3765,7 +3773,8 @@ const createPublishGithubPullRequestAction = (options) => {
|
|
|
3765
3773
|
sourcePath,
|
|
3766
3774
|
token: providedToken,
|
|
3767
3775
|
reviewers,
|
|
3768
|
-
teamReviewers
|
|
3776
|
+
teamReviewers,
|
|
3777
|
+
commitMessage
|
|
3769
3778
|
} = ctx.input;
|
|
3770
3779
|
const { owner, repo, host } = parseRepoUrl(repoUrl, integrations);
|
|
3771
3780
|
if (!owner) {
|
|
@@ -3820,7 +3829,7 @@ const createPublishGithubPullRequestAction = (options) => {
|
|
|
3820
3829
|
changes: [
|
|
3821
3830
|
{
|
|
3822
3831
|
files,
|
|
3823
|
-
commit: title
|
|
3832
|
+
commit: commitMessage != null ? commitMessage : title
|
|
3824
3833
|
}
|
|
3825
3834
|
],
|
|
3826
3835
|
body: description,
|
|
@@ -6003,4 +6012,4 @@ exports.createWaitAction = createWaitAction;
|
|
|
6003
6012
|
exports.executeShellCommand = executeShellCommand;
|
|
6004
6013
|
exports.fetchContents = fetchContents;
|
|
6005
6014
|
exports.scaffolderTemplateRules = scaffolderTemplateRules;
|
|
6006
|
-
//# sourceMappingURL=ScaffolderEntitiesProcessor-
|
|
6015
|
+
//# sourceMappingURL=ScaffolderEntitiesProcessor-b5a2b352.cjs.js.map
|