Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Commit 6459cdf

Browse files
authored
fix: Set executor selection in JobInspector (#113)
1 parent ea8a870 commit 6459cdf

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"homepage": "https://circleci-public.github.io/visual-config-editor/",
55
"dependencies": {
6-
"@circleci/circleci-config-sdk": "0.6.0",
6+
"@circleci/circleci-config-sdk": "0.7.0",
77
"@craco/craco": "^6.3.0",
88
"@monaco-editor/react": "^4.3.1",
99
"@testing-library/jest-dom": "^5.11.4",

src/components/containers/inspector/JobInspector.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const JobInspector = (
1212
props: FormikValues & { definitions: DefinitionModel },
1313
) => {
1414
const navigateTo = useStoreActions((actions) => actions.navigateTo);
15+
const executor = props.values.executor;
16+
const executorName = typeof executor === 'string' ? executor : executor.name;
1517

1618
return (
1719
<div>
@@ -20,6 +22,7 @@ const JobInspector = (
2022
label="Executor"
2123
as="select"
2224
name="executor.name"
25+
value={executorName}
2326
required
2427
>
2528
{[{ name: 'Select Executor' }, ...props.definitions.executors].map(

src/mappings/ExecutorMapping.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const ExecutorMapping: ComponentMapping<
8080
const oldJob = nodeData.job;
8181

8282
return new WorkflowJob(
83-
new Job(oldJob.name, data, oldJob.steps),
83+
new Job(oldJob.name, data.reuse(), oldJob.steps),
8484
nodeData.parameters,
8585
);
8686
},

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,10 +1081,10 @@
10811081
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
10821082
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
10831083

1084-
"@circleci/circleci-config-sdk@0.6.0":
1085-
version "0.6.0"
1086-
resolved "https://registry.yarnpkg.com/@circleci/circleci-config-sdk/-/circleci-config-sdk-0.6.0.tgz#7374b92282a29aaef3efdf5868116f9034c39dcc"
1087-
integrity sha512-AHWL1h+nwZvqttjIDNsIaenJ5V0Gkc3bj9LCBv9dRJ2325T+XmntIauO5cy9JFYgv9v9GOXlpo/C6cFMHWjOAA==
1084+
"@circleci/circleci-config-sdk@0.7.0":
1085+
version "0.7.0"
1086+
resolved "https://registry.yarnpkg.com/@circleci/circleci-config-sdk/-/circleci-config-sdk-0.7.0.tgz#561584b8ab18fd9e92d40f357e5d3086d976fe9a"
1087+
integrity sha512-43+WMaMlmmwOJdhSCi7OELukCwkedskw8XLGFNHKR2kmH/ADEbeOurkB0wefZq9mOe9h2zpmnYRi1lYnIndpMQ==
10881088
dependencies:
10891089
ajv "^8.8.2"
10901090
ajv-merge-patch "^5.0.1"

0 commit comments

Comments
 (0)