storyblok-cli icon indicating copy to clipboard operation
storyblok-cli copied to clipboard

Introduce Datasource Filtering on sync command based on Name and Slug

Open CaprinaeWT opened this issue 1 year ago • 0 comments

Pull request type

Jira Link: INT-

  • [ ] Bugfix
  • [X] Feature
  • [ ] Code style update (formatting, renaming)
  • [ ] Refactoring (no functional changes, no api changes)
  • [ ] Other (please describe):

How to test this PR

  1. Run the following command to test the datasource filtering feature by slug: ./cli.js sync --type datasources <source-space-id> --target <target-space-id> --datasources-starts-with-slug global An example of the terminal output: datasources where the slug starts with "global": global-translations-Mobility, global-projects.

  2. Test the datasource filtering feature by name using the following command: ./cli.js sync --type datasources <source-space-id> --target <target-space-id> --datasources-starts-with-name global An example of the terminal output: datasources where the slug starts with "global": Global Translations Mobility, Global Projects.

  3. Verify that only the datasources belonging to the specified name and/or slug are synchronized between the source and target. Datasources that do not match the specified name and/or slug should not be synchronized.

  4. Experiment with different combinations of name and/or slug to ensure that the filtering feature functions as expected.

Please note that the --datasources-starts-with-slug and --datasources-starts-with-name options enable filtering based on the provided name and/or slug. Replace and with the actual values of the source space and target space.

What is the new behavior?

This pull request introduces a new feature that enhances the datasource synchronization by allowing filtering based on the name and/or slug of the datasources. With this feature, users can selectively synchronize only the datasources that match the specified name and/or slug, providing a more efficient way to manage a large number of data sources across different projects.

Other information

CaprinaeWT avatar Jun 15 '23 08:06 CaprinaeWT