Skip to content

Comments

feat: resolve .ktickets relative to git root#7

Merged
kostyay merged 1 commit intomainfrom
feat/gitroot-resolve
Feb 11, 2026
Merged

feat: resolve .ktickets relative to git root#7
kostyay merged 1 commit intomainfrom
feat/gitroot-resolve

Conversation

@kostyay
Copy link
Owner

@kostyay kostyay commented Feb 11, 2026

Summary

  • .ktickets now resolves relative to git root instead of cwd, so running kt from subdirectories works correctly
  • GenerateID uses git root dir name for consistent ticket prefixes regardless of cwd
  • Falls back to cwd with stderr warning when not in a git repo; KTICKET_DIR env var still takes priority

Test plan

  • go test ./... — all passing
  • go vet ./... — clean
  • golangci-lint run ./... — 0 issues
  • Manual: cd into subdirectory of a git repo, run kt list — should find tickets at repo root

🤖 Generated with Claude Code

Previously .ktickets resolved relative to cwd, so running kt from a
subdirectory placed tickets in the wrong location. Now walks up the
directory tree to find .git and places .ktickets beside it. GenerateID
also uses the git root dir name for consistent ticket prefixes.

Falls back to cwd with a stderr warning when not in a git repo.
KTICKET_DIR env var still takes priority.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kostyay kostyay merged commit b920681 into main Feb 11, 2026
3 checks passed
@kostyay kostyay deleted the feat/gitroot-resolve branch February 11, 2026 00:05
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