chore(x2a): Create ArtifactKind class#3160
Conversation
Create a new class for ArtifactKind to make it simple to use it in all the places. Signed-off-by: Eloy Coto <eloy.coto@acalustra.com>
Missing ChangesetsThe following package(s) are changed by this PR but do not have a changeset:
See CONTRIBUTING.md for more information about how to add changesets. Changed Packages
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3160 +/- ##
==========================================
+ Coverage 60.97% 60.99% +0.02%
==========================================
Files 2095 2096 +1
Lines 65117 65153 +36
Branches 17030 17031 +1
==========================================
+ Hits 39703 39742 +39
+ Misses 24847 24844 -3
Partials 567 567
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
mareklibra
left a comment
There was a problem hiding this comment.
There are still raw-string comparisons left in the code.
When we have decided to wrap it by classes, they should be refactored.
| } | ||
|
|
||
| static all(): readonly ArtifactKind[] { | ||
| return [ |
There was a problem hiding this comment.
Nitpick: to simplify maintenance, we can declare private static ALL = Object.freeze([...]), simply return it here plus reuse it for the BY_VALUE. By doing that, maintenance will be simpler and returned arrays always the same (equal by reference)
```
$ -> for t in migration_plan module_migration_plan migrated_sources project_metadata ansible_project; do
echo "=== $t ==="
ack "'$t'" plugins/ --ts | grep "=="
done
=== migration_plan ===
=== module_migration_plan ===
=== migrated_sources ===
=== project_metadata ===
=== ansible_project ===
```
Signed-off-by: Eloy Coto <eloy.coto@acalustra.com>
|
|
@mareklibra comments has been fixed. |



Create a new class for ArtifactKind to make it simple to use it in all the places.