Skip to content

chore(x2a): Create ArtifactKind class#3160

Open
eloycoto wants to merge 2 commits into
redhat-developer:mainfrom
eloycoto:CL-6
Open

chore(x2a): Create ArtifactKind class#3160
eloycoto wants to merge 2 commits into
redhat-developer:mainfrom
eloycoto:CL-6

Conversation

@eloycoto
Copy link
Copy Markdown
Contributor

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

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>
@rhdh-gh-app
Copy link
Copy Markdown

rhdh-gh-app Bot commented May 18, 2026

Missing Changesets

The following package(s) are changed by this PR but do not have a changeset:

  • @red-hat-developer-hub/backstage-plugin-x2a

See CONTRIBUTING.md for more information about how to add changesets.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-x2a-backend workspaces/x2a/plugins/x2a-backend patch v1.4.2
@red-hat-developer-hub/backstage-plugin-x2a-common workspaces/x2a/plugins/x2a-common patch v1.2.1
@red-hat-developer-hub/backstage-plugin-x2a workspaces/x2a/plugins/x2a none v1.2.2

@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Patch coverage is 90.47619% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.99%. Comparing base (b04b63c) to head (a978837).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

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              
Flag Coverage Δ *Carryforward flag
adoption-insights 83.58% <ø> (ø) Carriedforward from 136478b
ai-integrations 70.03% <ø> (ø) Carriedforward from 136478b
app-defaults 69.60% <ø> (ø) Carriedforward from 136478b
augment 69.36% <ø> (ø) Carriedforward from 136478b
bulk-import 72.86% <ø> (ø) Carriedforward from 136478b
cost-management 16.49% <ø> (ø) Carriedforward from 136478b
dcm 32.85% <ø> (ø) Carriedforward from 136478b
extensions 61.79% <ø> (ø) Carriedforward from 136478b
global-floating-action-button 73.75% <ø> (ø) Carriedforward from 136478b
global-header 61.68% <ø> (ø) Carriedforward from 136478b
homepage 50.84% <ø> (ø) Carriedforward from 136478b
konflux 91.01% <ø> (ø) Carriedforward from 136478b
lightspeed 68.43% <ø> (ø) Carriedforward from 136478b
mcp-integrations 81.59% <ø> (ø) Carriedforward from 136478b
orchestrator 36.36% <ø> (ø) Carriedforward from 136478b
quickstart 62.64% <ø> (ø) Carriedforward from 136478b
sandbox 79.49% <ø> (ø) Carriedforward from 136478b
scorecard 83.55% <ø> (ø) Carriedforward from 136478b
theme 64.54% <ø> (ø) Carriedforward from 136478b
translations 8.49% <ø> (ø) Carriedforward from 136478b
x2a 78.52% <90.47%> (+0.23%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Sentry.

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@eloycoto eloycoto marked this pull request as ready for review May 18, 2026 11:49
@eloycoto eloycoto requested review from a team, elai-shalev and mareklibra as code owners May 18, 2026 11:49
Copy link
Copy Markdown
Member

@mareklibra mareklibra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 [
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@sonarqubecloud
Copy link
Copy Markdown

@eloycoto
Copy link
Copy Markdown
Contributor Author

@mareklibra comments has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants