Skip to content

fix(repos): run hygiene from invocation directory#118

Merged
aguil merged 4 commits into
masterfrom
fix/repos-hygiene-invocation-dir
Jul 11, 2026
Merged

fix(repos): run hygiene from invocation directory#118
aguil merged 4 commits into
masterfrom
fix/repos-hygiene-invocation-dir

Conversation

@aguil

@aguil aguil commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Use invocation_directory() in repos::hygiene and repos::hygiene-prune so bookmark/PR hygiene audits the checkout the operator is standing in (including jj workspaces and git worktrees), not the dotfiles justfile directory.
  • Add integration coverage and harden repos-smoke.sh to cd to the repo root before invoking just.
  • Document the CWD contract in docs/repo-maintenance.md and the bookmark-pr-hygiene skill.

Fixes #117.

Test plan

  • From ~/dev/projects/tmuxr/work (jj workspace): just repos::hygiene detects jj-workspace instead of failing with "not inside a jj or git repository"
  • just -f qa.just test-shell-integration (hygiene tests need gh API access)
  • bash scripts/repos-smoke.sh from an arbitrary CWD inside the dotfiles repo

Made with Cursor

aguil added 3 commits July 11, 2026 14:56
Use just invocation_directory() so repos::hygiene and repos::hygiene-prune
audit the checkout the operator is standing in, not the dotfiles justfile
directory. Fixes #117.
Add an integration test that runs hygiene from a subdirectory and cd to
repo root in repos-smoke so the smoke script is caller-CWD independent.
Extract bookmark-pr-hygiene gh mocks into a shared helper so just
contract tests and repos-smoke do not depend on live GitHub API access.
@aguil aguil force-pushed the fix/repos-hygiene-invocation-dir branch from e99759f to c1ab6ce Compare July 11, 2026 21:02
@aguil aguil force-pushed the fix/repos-hygiene-invocation-dir branch from 083919e to c3bc89a Compare July 11, 2026 21:03
@aguil aguil merged commit 370da55 into master Jul 11, 2026
1 check passed
@aguil aguil deleted the fix/repos-hygiene-invocation-dir branch July 11, 2026 21:17
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.

repos::hygiene runs from justfile CWD, not invocation directory

1 participant