Skip to content

Comments

tk query [--include-full-path]#38

Open
nickolay-kondratyev wants to merge 2 commits intowedow:masterfrom
nickolay-kondratyev:query--include-full-path
Open

tk query [--include-full-path]#38
nickolay-kondratyev wants to merge 2 commits intowedow:masterfrom
nickolay-kondratyev:query--include-full-path

Conversation

@nickolay-kondratyev
Copy link

Add optional flag to [tk query] to include full path of the file.

  query [options] [jq-filter] Output tickets as JSON, optionally filtered
    --include-full-path      Include absolute file path in each JSON object

Testing

  • Existing tests passed:
12 features passed, 0 failed, 0 skipped
126 scenarios passed, 0 failed, 0 skipped
841 steps passed, 0 failed, 0 skipped
Took 0min 7.535s

New tests added:

  Scenario: Query with --include-full-path includes file path
    Given a ticket exists with ID "query-001" and title "Path ticket"
    When I run "ticket query --include-full-path"
    Then the command should succeed
    And the output should be valid JSONL
    And the JSONL output should have field "full_path"
    And the output should contain "query-001.md"

  Scenario: Query with --include-full-path and jq filter
    Given a ticket exists with ID "query-001" and title "Open path ticket"
    And a ticket exists with ID "query-002" and title "Closed path ticket"
    And ticket "query-002" has status "closed"
    When I run "ticket query --include-full-path '.status == \"open\"'"
    Then the command should succeed
    And the JSONL output should have field "full_path"
    And the output should contain "query-001"
    And the output should not contain "query-002"

  Scenario: Query without --include-full-path excludes file path
    Given a ticket exists with ID "query-001" and title "No path ticket"
    When I run "ticket query"
    Then the command should succeed
    And the output should not contain "full_path"

## Squashed commits:

chore: add AI coordination artifacts for query --include-full-path

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

--------------------------------
feat: add --include-full-path flag to query command

When present, each JSONL object includes a "full_path" key with the
absolute path to the ticket's .md file. Works with and without jq filters.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

--------------------------------
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.

1 participant