Skip to content

[DIT-12572] Support filtering by tags#137

Merged
jholiga merged 1 commit intomasterfrom
joey/dit-12572-add-tags-filter-to-cli
Mar 31, 2026
Merged

[DIT-12572] Support filtering by tags#137
jholiga merged 1 commit intomasterfrom
joey/dit-12572-add-tags-filter-to-cli

Conversation

@jholiga
Copy link
Copy Markdown
Contributor

@jholiga jholiga commented Mar 27, 2026

Overview

Adds the ability to filter the pull command response by tags — allowing users to scope text items and components by one or more tags, with support for AND/OR operators.

Supports top-level and output-specific tags configuration:

tags:
  values:
    - "tag-1"
    - "tag-2"
  operator: "AND"

Context

https://linear.app/dittowords/issue/DIT-12572/add-tags-filter-to-cli

API reference: https://developer.dittowords.com/api-reference/text-items/get-text-items

Follows similar pattern established in PR #135 (integrated filter).

Screenshots

N/A

Test Plan

Testing successfully completed via:

  • Add tags filter at the top level of config.yml with one or more tag values
  • Run yarn start pull and confirm only items matching the specified tags are returned
  • Change operator to "AND" and confirm only items with ALL specified tags are returned
  • Change operator to "OR" (or omit it) and confirm items with ANY of the specified tags are returned
  • Add multiple outputs to config with different tags overrides
  • If an output has tags, that output should use those tags
  • If an output doesn't have tags, the top-level tags filter should be used
  • If there is no tags filter in an output or top level, no tags filter should be applied (all items returned)
  • Confirm tags filtering works for both text items and components
  • Confirm tags filtering works for export formatters
  • Run yarn test — all 232 tests pass

@jholiga jholiga merged commit dc2d1ed into master Mar 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants