Skip to content

fix: add helper snake to camle case (CM-1285) - #4258

Merged
ulemons merged 1 commit into
mainfrom
fix/adjust-signal-coverage-object
Jun 24, 2026
Merged

fix: add helper snake to camle case (CM-1285)#4258
ulemons merged 1 commit into
mainfrom
fix/adjust-signal-coverage-object

Conversation

@ulemons

@ulemons ulemons commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the signalCoverageHealth object returned by the package detail API: keys were coming through in snake_case (as stored in the DB by Tinybird) and are now converted to camelCase to be consistent with the rest of the API response.

Changes

  • getPackage.ts: adds a snakeToCamelKeys helper that converts top-level object keys from snake_case to camelCase, and applies it to signalCoverageHealth before returning the response.
    • e.g. bus_factorbusFactor, supply_chain_integritysupplyChainIntegrity
    • The helper is a pass-through for null (not-yet-enriched packages).

Type of change

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Performance improvement
  • Chore / dependency update
  • Documentation

JIRA ticket

CM-1285


Note

Low Risk
Single-field response shaping in a read endpoint; no auth, persistence, or behavioral logic changes beyond key naming.

Overview
Fixes signalCoverageHealth on the package detail API so top-level keys match the rest of the response (camelCase) instead of the snake_case shape from Tinybird/DB storage.

Adds a snakeToCamelKeys helper in getPackage.ts (pass-through for null) and wraps pkg.signalCoverageHealth before it is returned—e.g. bus_factorbusFactor, supply_chain_integritysupplyChainIntegrity.

Reviewed by Cursor Bugbot for commit 86ee6f3. Bugbot is set up for automated code reviews on this repo. Configure here.

Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
@ulemons ulemons self-assigned this Jun 24, 2026
@ulemons ulemons added the Bug Created by Linear-GitHub Sync label Jun 24, 2026
Copilot AI review requested due to automatic review settings June 24, 2026 11:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes the public package detail API response shape by converting signalCoverageHealth keys from Tinybird/DB-style snake_case to API-consistent camelCase.

Changes:

  • Add a small snakeToCamelKeys helper for top-level key conversion (pass-through for null).
  • Apply the helper to pkg.signalCoverageHealth before returning the response payload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ulemons
ulemons merged commit e67136b into main Jun 24, 2026
22 checks passed
@ulemons
ulemons deleted the fix/adjust-signal-coverage-object branch June 24, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Created by Linear-GitHub Sync

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants