CircleCI-Public / circleci-config-sdk-ts

Generate CircleCI Configuration YAML from JavaScript or TypeScript. Use Dynamic Configuration and the Config SDK together for live generative config.
https://circleci-public.github.io/circleci-config-sdk-ts/
Apache License 2.0
82 stars 29 forks source link

feat: Reuse Executors Definintions with Properties #98

Closed Jaryt closed 2 years ago

Jaryt commented 2 years ago

Previously, we had reusable executors which were serving as usage and definition. This was incorrect and this PR implements ReusedExecutor to solve that, along with helper functions to make using executors easier.

ghost commented 2 years ago
👇 Click on the image for a new way to code review - Make big changes easier — review code in small groups of related files - Know where to start — see the whole change at a glance - Take a code tour — explore the change with an interactive tour - Make comments and review — all fully sync’ed with github [Try it now!](https://app.codesee.io/r/reviews?pr=98&src=https%3A%2F%2Fgithub.com%2FCircleCI-Public%2Fcircleci-config-sdk-ts)

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

codecov[bot] commented 2 years ago

Codecov Report

Merging #98 (f3f75f7) into main (933cde8) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #98   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           92        93    +1     
  Lines          905       923   +18     
  Branches        82        84    +2     
=========================================
+ Hits           905       923   +18     
Impacted Files Coverage Δ
...nts/Executors/schemas/ReusableExecutable.schema.ts 100.00% <ø> (ø)
src/lib/Config/exports/Validator.ts 100.00% <ø> (ø)
src/lib/Config/index.ts 100.00% <ø> (ø)
src/lib/Components/Executors/exports/Executor.ts 100.00% <100.00%> (ø)
...b/Components/Executors/exports/ReusableExecutor.ts 100.00% <100.00%> (ø)
...lib/Components/Executors/exports/ReusedExecutor.ts 100.00% <100.00%> (ø)
src/lib/Components/Executors/parsers/index.ts 100.00% <100.00%> (ø)
src/lib/Components/Job/index.ts 100.00% <100.00%> (ø)
src/lib/Config/exports/Mapping.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 933cde8...f3f75f7. Read the comment docs.