Skip to content

Beautify action names via config file #45

@davidferlay

Description

@davidferlay

Observed

  • Action names, as listed in available actions, is based on discovery plugin

  • Except for removing /actions/**/action.yaml from string, naming stricly follows directory path

  • So for instance:

    • integration/applications/roles/event_bus/actions/event-bus/action.yaml
      • would name action integration.applications.roles.event_bus:event-bus
    • integration/applications/roles/actions/event-bus/action.yaml
      • would name action integration.applications.roles:event-bus
    • integration/applications/actions/event-bus/action.yaml
      • would name action integration.applications:event-bus
  • Directory architecture may be under external constraints, like matching Ansible pattern for instance, where is required

    • /roles/
    • resource names with underscore _

Expected

  • It may be useful to be able to configure globally the transformation of action naming
  • .{binary-name}/config.yaml file could introduce a section launchrctl that allow user to specify regex to transform naming in specific ways, like
launcrctl:
  actions_naming:
    - s/\/roles\///g # To remove /roles/
    - s/_/-/g # To convert _ to -

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