@backstage/plugin-scaffolder-backend 1.13.0-next.2 → 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 CHANGED
@@ -1,5 +1,33 @@
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
+
3
31
  ## 1.13.0-next.2
4
32
 
5
33
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-scaffolder-backend",
3
- "version": "1.13.0-next.2",
3
+ "version": "1.13.0-next.3",
4
4
  "main": "../dist/alpha.cjs.js",
5
5
  "types": "../dist/alpha.d.ts"
6
6
  }
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-21c74c4d.cjs.js');
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');
@@ -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-21c74c4d.cjs.js.map
6015
+ //# sourceMappingURL=ScaffolderEntitiesProcessor-b5a2b352.cjs.js.map