Skip to content

Magic string in OhDear import for component status mapping #339

@jbrooksuk

Description

@jbrooksuk

Priority: P3 (Medium - Plan to Fix)

Problem

In src/Actions/Integrations/ImportOhDearFeed.php:38, the comparison $site['status'] === 'up' uses a raw magic string.

The ExternalProviderEnum already has a status() method that maps external strings to IncidentStatusEnum, but there is no equivalent for component status mapping.

Suggested Fix

Add a componentStatus() method to ExternalProviderEnum (or a dedicated mapper) to centralize the 'up' / 'down' to ComponentStatusEnum mapping.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions