8000 feat(status): cover only the repository I stand in by dominikwozniak · Pull Request #100 · dominikwozniak/dw-mc · GitHub
[go: up one dir, main page]

Skip to content

feat(status): cover only the repository I stand in - #100

Merged
dominikwozniak merged 1 commit into
mainfrom
feat/98-status-scope
Sep 18, 2026
Merged

dominikwozniak merged 1 commit into
mainfrom
feat/98-status-scope

Conversation

@dominikwozniak
Copy link
Copy Markdown
Owner

Standing in one repository, the table I want is that repository's. Every sweep also reads every registered repository from GitHub, so pull requests I am not looking at cost calls. dw-mc status and dw-mc sweep cover the registered repository the working directory is in, --repo names one from anywhere, and --all covers every one. A narrowed report ends on a line naming what it shows, so a table of one repository is not read as all of them.

Closes #98.

What changes

  • src/domain/coverage.ts — the rule: --repo, then --all, then the registered repository I stand in, and otherwise every registered one. It refuses an unregistered --repo, naming the registered ones, and refuses --repo with --all.
  • src/cli/sweep.ts — the sweep takes what was asked, asks gh repo view where I stand only when neither flag decides, and reads only the covered repositories. --repo, --all and the closing line live here, shared by both commands.
  • dw-mc status / dw-mc sweep take the two flags. The picker asks for every registered repository, as it always has.
  • CONTEXT.md — "Sweep" says which repositories one covers.

Test plan

  • pnpm check — pass, 713 tests
  • src/domain/coverage.test.ts — 9 new cases, one per branch of the rule
  • src/cli/status.test.ts — 9 new cases: the table, the closing line, an unscoped repository never searched, both refusals, and sweep narrowed by the directory and by --repo. The full spawn list and the read-only check both include the new gh repo view --json nameWithOwner.
  • by hand, node dist/bin.js against my own config with two repositories registered:
    • status inside dw-mc: its table only, plus the closing line
    • sweep from ~: 7 pull requests across 2 repositories
    • status --all: the full table
    • sweep --repo AirHelp/ahplus-rails: 1 repository, plus the closing line
    • --repo someone/else: refused, exit 1
    • --repo with --all: refused

Risk

Low: this only changes what is read and shown, and never writes. If the rule misfires, --all gives the whole table back, and git revert removes the change.

🤖 Generated with Claude Code

Standing in one repository, the table I want is that repository's, and a
sweep over every registered one spends GitHub calls on pull requests I am
not looking at. The working directory now decides what status and sweep
cover when it is a registered repository; --repo names one from anywhere,
and --all keeps the whole picture. A narrowed report says what it left
out, so a table of one repository is not read as all of them.

Closes #98

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dominikwozniak
dominikwozniak merged commit 1a608ad into main Sep 18, 2026
1 check passed
@dominikwozniak
dominikwozniak deleted the feat/98-status-scope branch September 18, 2026 09:06
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.

status: scope the table and the sweep to one repository

1 participant

0