Fixed bug in the customProperties type
Signed-off-by: adrian-321 <adrian.gardiner1@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend-module-github': patch
|
||||
---
|
||||
|
||||
Fixed bug in the `customProperties` type which was preventing it being used to set a list of values against a key (e.g. for multi-select fields)
|
||||
@@ -267,7 +267,7 @@ export function createGithubRepoCreateAction(options: {
|
||||
| undefined;
|
||||
requiredCommitSigning?: boolean | undefined;
|
||||
requiredLinearHistory?: boolean | undefined;
|
||||
customProperties?: Record<string, string> | undefined;
|
||||
customProperties?: Record<string, string | string[]> | undefined;
|
||||
subscribe?: boolean | undefined;
|
||||
},
|
||||
{
|
||||
@@ -426,7 +426,7 @@ export function createPublishGithubAction(options: {
|
||||
| undefined;
|
||||
requiredCommitSigning?: boolean | undefined;
|
||||
requiredLinearHistory?: boolean | undefined;
|
||||
customProperties?: Record<string, string> | undefined;
|
||||
customProperties?: Record<string, string | string[]> | undefined;
|
||||
subscribe?: boolean | undefined;
|
||||
},
|
||||
{
|
||||
|
||||
@@ -330,7 +330,7 @@ describe('publish:github', () => {
|
||||
...mockContext.input,
|
||||
customProperties: {
|
||||
foo: 'bar',
|
||||
foo2: 'bar2',
|
||||
foo2: ['bar2', 'bar3'],
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -505,7 +505,7 @@ describe('publish:github', () => {
|
||||
...mockContext.input,
|
||||
customProperties: {
|
||||
foo: 'bar',
|
||||
foo2: 'bar2',
|
||||
foo2: ['bar2', 'bar3'],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -279,7 +279,7 @@ describe('github:repo:create', () => {
|
||||
...mockContext.input,
|
||||
customProperties: {
|
||||
foo: 'bar',
|
||||
foo2: 'bar2',
|
||||
foo2: ['bar2', 'bar3'],
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -455,7 +455,7 @@ describe('github:repo:create', () => {
|
||||
...mockContext.input,
|
||||
customProperties: {
|
||||
foo: 'bar',
|
||||
foo2: 'bar2',
|
||||
foo2: ['bar2', 'bar3'],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -75,7 +75,7 @@ export async function createGithubRepoWithCollaboratorsAndTopics(
|
||||
includeClaimKeys?: string[];
|
||||
}
|
||||
| undefined,
|
||||
customProperties: { [key: string]: string } | undefined,
|
||||
customProperties: { [key: string]: string | string[] } | undefined,
|
||||
subscribe: boolean | undefined,
|
||||
logger: LoggerService,
|
||||
) {
|
||||
|
||||
@@ -385,9 +385,9 @@ const oidcCustomization = (z: typeof zod) =>
|
||||
|
||||
const customProperties = (z: typeof zod) =>
|
||||
z
|
||||
.record(z.string(), {
|
||||
.record(z.union([z.string(), z.array(z.string())]), {
|
||||
description:
|
||||
'Custom properties to be added to the repository (note, this only works for organization repositories)',
|
||||
'Custom properties to be added to the repository (note, this only works for organization repositories). All values must be strings',
|
||||
})
|
||||
.optional();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user