@backstage/plugin-scaffolder-backend 1.10.0-next.2 → 1.10.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 +138 -0
- package/alpha/package.json +1 -1
- package/dist/index.alpha.d.ts +36 -1
- package/dist/index.beta.d.ts +35 -0
- package/dist/index.cjs.js +249 -89
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +35 -0
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,143 @@
|
|
|
1
1
|
# @backstage/plugin-scaffolder-backend
|
|
2
2
|
|
|
3
|
+
## 1.10.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/backend-common@0.18.1
|
|
9
|
+
- @backstage/backend-tasks@0.4.2
|
|
10
|
+
- @backstage/plugin-auth-node@0.2.10
|
|
11
|
+
- @backstage/plugin-catalog-backend@1.7.1
|
|
12
|
+
- @backstage/plugin-catalog-node@1.3.2
|
|
13
|
+
- @backstage/backend-plugin-api@0.3.1
|
|
14
|
+
|
|
15
|
+
## 1.10.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- a6808b67a7: Implement `Required approving review count`, `Restrictions`, and `Required commit signing` support for `publish:github` action
|
|
20
|
+
- 04a2048fb8: Allow custom repository roles to be configured on github repos
|
|
21
|
+
- c0ad7341f7: Add Scaffolder action `catalog:fetch` to get entity by entity reference from catalog
|
|
22
|
+
- b44eb68bcb: This change adds changes to provide examples alongside scaffolder task actions.
|
|
23
|
+
|
|
24
|
+
The `createTemplateAction` function now takes a list of examples e.g.
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
const actionExamples = [
|
|
28
|
+
{
|
|
29
|
+
description: 'Example 1',
|
|
30
|
+
example: yaml.stringify({
|
|
31
|
+
steps: [
|
|
32
|
+
{
|
|
33
|
+
action: 'test:action',
|
|
34
|
+
id: 'test',
|
|
35
|
+
input: {
|
|
36
|
+
input1: 'value',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
}),
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
|
|
44
|
+
export function createTestAction() {
|
|
45
|
+
return createTemplateAction({
|
|
46
|
+
id: 'test:action',
|
|
47
|
+
examples: [
|
|
48
|
+
{
|
|
49
|
+
description: 'Example 1',
|
|
50
|
+
examples: actionExamples
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
...,
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
These examples can be retrieved later from the api.
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
curl http://localhost:7007/api/scaffolder/v2/actions
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
[
|
|
65
|
+
{
|
|
66
|
+
"id": "test:action",
|
|
67
|
+
"examples": [
|
|
68
|
+
{
|
|
69
|
+
"description": "Example 1",
|
|
70
|
+
"example": "steps:\n - action: test:action\n id: test\n input:\n input1: value\n"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"schema": {
|
|
74
|
+
"input": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"properties": {
|
|
77
|
+
"input1": {
|
|
78
|
+
"title": "Input 1",
|
|
79
|
+
"type": "string"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
- 72d6b9f4e2: Added ability to override the commit message and author details for the `publish:bitbucketServer` action.
|
|
89
|
+
- a69664faee: Add Github repository support for squash merge commit title and message options
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- 2fadff2a25: Change scaffolder task actions to include markdown to demonstrate the new `ActionsPage` markdown feature.
|
|
94
|
+
- ecbec4ec4c: Internal refactor to match new options pattern in the experimental backend system.
|
|
95
|
+
- e4c0240445: Added `catalogFilter` field to OwnerPicker and EntityPicker components to support filtering options by any field(s) of an entity.
|
|
96
|
+
|
|
97
|
+
The `allowedKinds` field has been deprecated. Use `catalogFilter` instead. This field allows users to specify a filter on the shape of [EntityFilterQuery](https://github.com/backstage/backstage/blob/774c42003782121d3d6b2aa5f2865d53370c160e/packages/catalog-client/src/types/api.ts#L74), which can be passed into the CatalogClient. See examples below:
|
|
98
|
+
|
|
99
|
+
- Get all entities of kind `Group`
|
|
100
|
+
|
|
101
|
+
```yaml
|
|
102
|
+
owner:
|
|
103
|
+
title: Owner
|
|
104
|
+
type: string
|
|
105
|
+
description: Owner of the component
|
|
106
|
+
ui:field: OwnerPicker
|
|
107
|
+
ui:options:
|
|
108
|
+
catalogFilter:
|
|
109
|
+
- kind: Group
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
- Get entities of kind `Group` and spec.type `team`
|
|
113
|
+
```yaml
|
|
114
|
+
owner:
|
|
115
|
+
title: Owner
|
|
116
|
+
type: string
|
|
117
|
+
description: Owner of the component
|
|
118
|
+
ui:field: OwnerPicker
|
|
119
|
+
ui:options:
|
|
120
|
+
catalogFilter:
|
|
121
|
+
- kind: Group
|
|
122
|
+
spec.type: team
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
- 8e06f3cf00: Switched imports of `loggerToWinstonLogger` to `@backstage/backend-common`.
|
|
126
|
+
- Updated dependencies
|
|
127
|
+
- @backstage/backend-plugin-api@0.3.0
|
|
128
|
+
- @backstage/backend-common@0.18.0
|
|
129
|
+
- @backstage/catalog-model@1.1.5
|
|
130
|
+
- @backstage/plugin-scaffolder-common@1.2.4
|
|
131
|
+
- @backstage/catalog-client@1.3.0
|
|
132
|
+
- @backstage/backend-tasks@0.4.1
|
|
133
|
+
- @backstage/plugin-catalog-node@1.3.1
|
|
134
|
+
- @backstage/plugin-catalog-backend@1.7.0
|
|
135
|
+
- @backstage/config@1.0.6
|
|
136
|
+
- @backstage/errors@1.1.4
|
|
137
|
+
- @backstage/integration@1.4.2
|
|
138
|
+
- @backstage/types@1.0.2
|
|
139
|
+
- @backstage/plugin-auth-node@0.2.9
|
|
140
|
+
|
|
3
141
|
## 1.10.0-next.2
|
|
4
142
|
|
|
5
143
|
### Patch Changes
|
package/alpha/package.json
CHANGED
package/dist/index.alpha.d.ts
CHANGED
|
@@ -150,6 +150,17 @@ message?: string | undefined;
|
|
|
150
150
|
listWorkspace?: boolean | undefined;
|
|
151
151
|
}>;
|
|
152
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Returns entity from the catalog by entity reference.
|
|
155
|
+
* @public
|
|
156
|
+
*/
|
|
157
|
+
export declare function createFetchCatalogEntityAction(options: {
|
|
158
|
+
catalogClient: CatalogApi;
|
|
159
|
+
}): TemplateAction< {
|
|
160
|
+
entityRef: string;
|
|
161
|
+
optional?: boolean | undefined;
|
|
162
|
+
}>;
|
|
163
|
+
|
|
153
164
|
/**
|
|
154
165
|
* Downloads content and places it in the workspace, or optionally
|
|
155
166
|
* in a subdirectory specified by the 'targetPath' input option.
|
|
@@ -299,6 +310,12 @@ users?: string[] | undefined;
|
|
|
299
310
|
teams?: string[] | undefined;
|
|
300
311
|
apps?: string[] | undefined;
|
|
301
312
|
} | undefined;
|
|
313
|
+
requiredApprovingReviewCount?: number | undefined;
|
|
314
|
+
restrictions?: {
|
|
315
|
+
users: string[];
|
|
316
|
+
teams: string[];
|
|
317
|
+
apps?: string[] | undefined;
|
|
318
|
+
} | undefined;
|
|
302
319
|
requiredStatusCheckContexts?: string[] | undefined;
|
|
303
320
|
requireBranchesToBeUpToDate?: boolean | undefined;
|
|
304
321
|
requiredConversationResolution?: boolean | undefined;
|
|
@@ -319,6 +336,7 @@ hasWiki?: boolean | undefined;
|
|
|
319
336
|
hasIssues?: boolean | undefined;
|
|
320
337
|
token?: string | undefined;
|
|
321
338
|
topics?: string[] | undefined;
|
|
339
|
+
requireCommitSigning?: boolean | undefined;
|
|
322
340
|
}>;
|
|
323
341
|
|
|
324
342
|
/**
|
|
@@ -347,11 +365,18 @@ users?: string[];
|
|
|
347
365
|
teams?: string[];
|
|
348
366
|
apps?: string[];
|
|
349
367
|
} | undefined;
|
|
368
|
+
requiredApprovingReviewCount?: number | undefined;
|
|
369
|
+
restrictions?: {
|
|
370
|
+
users: string[];
|
|
371
|
+
teams: string[];
|
|
372
|
+
apps?: string[];
|
|
373
|
+
} | undefined;
|
|
350
374
|
requiredStatusCheckContexts?: string[] | undefined;
|
|
351
375
|
requireBranchesToBeUpToDate?: boolean | undefined;
|
|
352
376
|
requiredConversationResolution?: boolean | undefined;
|
|
353
377
|
sourcePath?: string | undefined;
|
|
354
378
|
token?: string | undefined;
|
|
379
|
+
requiredCommitSigning?: boolean | undefined;
|
|
355
380
|
}>;
|
|
356
381
|
|
|
357
382
|
/**
|
|
@@ -447,6 +472,9 @@ repoVisibility?: "private" | "public" | undefined;
|
|
|
447
472
|
sourcePath?: string | undefined;
|
|
448
473
|
enableLFS?: boolean | undefined;
|
|
449
474
|
token?: string | undefined;
|
|
475
|
+
gitCommitMessage?: string | undefined;
|
|
476
|
+
gitAuthorName?: string | undefined;
|
|
477
|
+
gitAuthorEmail?: string | undefined;
|
|
450
478
|
}>;
|
|
451
479
|
|
|
452
480
|
/**
|
|
@@ -517,6 +545,12 @@ users?: string[];
|
|
|
517
545
|
teams?: string[];
|
|
518
546
|
apps?: string[];
|
|
519
547
|
} | undefined;
|
|
548
|
+
requiredApprovingReviewCount?: number | undefined;
|
|
549
|
+
restrictions?: {
|
|
550
|
+
users: string[];
|
|
551
|
+
teams: string[];
|
|
552
|
+
apps?: string[];
|
|
553
|
+
} | undefined;
|
|
520
554
|
requireCodeOwnerReviews?: boolean | undefined;
|
|
521
555
|
dismissStaleReviews?: boolean | undefined;
|
|
522
556
|
requiredStatusCheckContexts?: string[] | undefined;
|
|
@@ -539,6 +573,7 @@ hasWiki?: boolean | undefined;
|
|
|
539
573
|
hasIssues?: boolean | undefined;
|
|
540
574
|
token?: string | undefined;
|
|
541
575
|
topics?: string[] | undefined;
|
|
576
|
+
requiredCommitSigning?: boolean | undefined;
|
|
542
577
|
}>;
|
|
543
578
|
|
|
544
579
|
/**
|
|
@@ -792,7 +827,7 @@ export declare type RunCommandOptions = {
|
|
|
792
827
|
* @alpha
|
|
793
828
|
* Registers the ScaffolderEntitiesProcessor with the catalog processing extension point.
|
|
794
829
|
*/
|
|
795
|
-
export declare const scaffolderCatalogModule: (
|
|
830
|
+
export declare const scaffolderCatalogModule: () => BackendFeature;
|
|
796
831
|
|
|
797
832
|
/** @public */
|
|
798
833
|
export declare class ScaffolderEntitiesProcessor implements CatalogProcessor {
|
package/dist/index.beta.d.ts
CHANGED
|
@@ -150,6 +150,17 @@ message?: string | undefined;
|
|
|
150
150
|
listWorkspace?: boolean | undefined;
|
|
151
151
|
}>;
|
|
152
152
|
|
|
153
|
+
/**
|
|
154
|
+
* Returns entity from the catalog by entity reference.
|
|
155
|
+
* @public
|
|
156
|
+
*/
|
|
157
|
+
export declare function createFetchCatalogEntityAction(options: {
|
|
158
|
+
catalogClient: CatalogApi;
|
|
159
|
+
}): TemplateAction< {
|
|
160
|
+
entityRef: string;
|
|
161
|
+
optional?: boolean | undefined;
|
|
162
|
+
}>;
|
|
163
|
+
|
|
153
164
|
/**
|
|
154
165
|
* Downloads content and places it in the workspace, or optionally
|
|
155
166
|
* in a subdirectory specified by the 'targetPath' input option.
|
|
@@ -299,6 +310,12 @@ users?: string[] | undefined;
|
|
|
299
310
|
teams?: string[] | undefined;
|
|
300
311
|
apps?: string[] | undefined;
|
|
301
312
|
} | undefined;
|
|
313
|
+
requiredApprovingReviewCount?: number | undefined;
|
|
314
|
+
restrictions?: {
|
|
315
|
+
users: string[];
|
|
316
|
+
teams: string[];
|
|
317
|
+
apps?: string[] | undefined;
|
|
318
|
+
} | undefined;
|
|
302
319
|
requiredStatusCheckContexts?: string[] | undefined;
|
|
303
320
|
requireBranchesToBeUpToDate?: boolean | undefined;
|
|
304
321
|
requiredConversationResolution?: boolean | undefined;
|
|
@@ -319,6 +336,7 @@ hasWiki?: boolean | undefined;
|
|
|
319
336
|
hasIssues?: boolean | undefined;
|
|
320
337
|
token?: string | undefined;
|
|
321
338
|
topics?: string[] | undefined;
|
|
339
|
+
requireCommitSigning?: boolean | undefined;
|
|
322
340
|
}>;
|
|
323
341
|
|
|
324
342
|
/**
|
|
@@ -347,11 +365,18 @@ users?: string[];
|
|
|
347
365
|
teams?: string[];
|
|
348
366
|
apps?: string[];
|
|
349
367
|
} | undefined;
|
|
368
|
+
requiredApprovingReviewCount?: number | undefined;
|
|
369
|
+
restrictions?: {
|
|
370
|
+
users: string[];
|
|
371
|
+
teams: string[];
|
|
372
|
+
apps?: string[];
|
|
373
|
+
} | undefined;
|
|
350
374
|
requiredStatusCheckContexts?: string[] | undefined;
|
|
351
375
|
requireBranchesToBeUpToDate?: boolean | undefined;
|
|
352
376
|
requiredConversationResolution?: boolean | undefined;
|
|
353
377
|
sourcePath?: string | undefined;
|
|
354
378
|
token?: string | undefined;
|
|
379
|
+
requiredCommitSigning?: boolean | undefined;
|
|
355
380
|
}>;
|
|
356
381
|
|
|
357
382
|
/**
|
|
@@ -447,6 +472,9 @@ repoVisibility?: "private" | "public" | undefined;
|
|
|
447
472
|
sourcePath?: string | undefined;
|
|
448
473
|
enableLFS?: boolean | undefined;
|
|
449
474
|
token?: string | undefined;
|
|
475
|
+
gitCommitMessage?: string | undefined;
|
|
476
|
+
gitAuthorName?: string | undefined;
|
|
477
|
+
gitAuthorEmail?: string | undefined;
|
|
450
478
|
}>;
|
|
451
479
|
|
|
452
480
|
/**
|
|
@@ -517,6 +545,12 @@ users?: string[];
|
|
|
517
545
|
teams?: string[];
|
|
518
546
|
apps?: string[];
|
|
519
547
|
} | undefined;
|
|
548
|
+
requiredApprovingReviewCount?: number | undefined;
|
|
549
|
+
restrictions?: {
|
|
550
|
+
users: string[];
|
|
551
|
+
teams: string[];
|
|
552
|
+
apps?: string[];
|
|
553
|
+
} | undefined;
|
|
520
554
|
requireCodeOwnerReviews?: boolean | undefined;
|
|
521
555
|
dismissStaleReviews?: boolean | undefined;
|
|
522
556
|
requiredStatusCheckContexts?: string[] | undefined;
|
|
@@ -539,6 +573,7 @@ hasWiki?: boolean | undefined;
|
|
|
539
573
|
hasIssues?: boolean | undefined;
|
|
540
574
|
token?: string | undefined;
|
|
541
575
|
topics?: string[] | undefined;
|
|
576
|
+
requiredCommitSigning?: boolean | undefined;
|
|
542
577
|
}>;
|
|
543
578
|
|
|
544
579
|
/**
|