redhat-developer / redhat-developer/rhdh-plugins
Scorecard: Refactore CatalogRequiredAttributesMetricProvider from number metrics to string metrics
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 48
- Forks
- 120
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 337
Description
This is a follow-up on issue #4256 and pr #4258
Migrate CatalogRequiredAttributesMetricProvider (in scorecard workspace, plugins/scorecard-backend-module-catalog/src/metricProviders/CatalogRequiredAttributesMetricProvider.ts) from number metrics to string metrics. For this add string as an alternative type support to the MetricType (in scorecard workspace, plugins/scorecard-common/src/types/Metric.ts)
So that the metrics can just return different status keys and don't need to map status values first to a number to convert it later again to a string via thresholds.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with plugins/scorecard-common/src/types/Metric.ts to inspect MetricType, then read plugins/scorecard-backend-module-catalog/src/metricProviders/CatalogRequiredAttributesMetricProvider.ts and the related issue or PR for context. Done means string metrics are supported and this provider can return status keys without converting them through numeric values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100