Skip to content

feat(manage-tag): import and export subcommands #181

@kyranet

Description

@kyranet

#17 in #suggestions.

The export format should match that of the accepted import format. Simply dumps all tags into a generated TOML file. Which format (BTF, JSON, YAML, TOML...) is still not decided yet. cc: @favna

The import subcommand however, is more complex:

  • It needs to validate the data schema beforehand:
    • Make sure all required fields exist and default those that don't exist (e.g. a future update that adds more fields in Teryl).
    • Make sure there are no duplicates between names and aliases in the imported file.
  • It needs to handle conflicts, and as such, it needs modes:
    • Overwrite tags with the same name and updates aliases that point to other tags (mode: Overwrite).
    • Overwrite tags with the same name, updates aliases that point to other tags, and deletes old aliases (mode: Replace).
    • Overwrite tags with the same name, doesn't import aliases (mode: Update).
    • Throw an error on conflict (mode: ?).
  • It needs to handle the tag and alias limits and their donator limits:
    • 50 tags by default, 100 tags starting at T3, 200 tags starting at T10, they're available in Ring's internal API.
    • Tags have a maximum of 10 aliases no matter the tier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions