-
Notifications
You must be signed in to change notification settings - Fork 2
feat: arr CLI
#372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
jonathanlab
wants to merge
27
commits into
main
Choose a base branch
from
feat/cli-core-packages
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: arr CLI
#372
+14,886
−37
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adds two new packages for the Array CLI stacking workflow: @array/core - Core library with: - JJ wrapper for jujutsu commands - GitHub API integration for PR management - Config/state management - Stack comment generation for linked PRs - Workspace management - Mock executor for testability @array/cli - Command-line interface with: - Stacking commands (create, up, down, top, bottom, log) - Changeset commands (enable, disable, swap, status, list) - PR workflow (submit, sync, restack) - GitHub auth integration - Interactive prompts Test coverage (289 tests): - Unit tests with mocked executors - Integration tests with real git/jj repos - E2E tests for CLI commands 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Convert vitest.config.ts from CommonJS to ESM syntax - Temporarily disable electron-trpc tests due to missing dependencies 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- `pnpm test:bun` - runs @array/core and @array/cli tests (bun) - `pnpm test:vitest` - runs array app and electron-trpc tests (vitest) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
| const changes: FileChange[] = []; | ||
|
|
||
| for (const line of lines) { | ||
| const match = line.match(/^([MADR])\s+(.+)$/); |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
This regular expression that depends on library input may run slow on strings starting with 'A ' and with many repetitions of ' '.
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stale
Previously, modify just called jj.status() and printed success. Now it properly calls jj squash to squash working copy into parent. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Previously arr top just navigated to the topmost described change. Now it creates an empty @ above the stack (if not already there), matching the STORIES.md expectation: "Empty @ above stack top". Uses jj directly to check if @ is empty/undescribed with no children. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
The revset `trunk()..heads(trunk()..)` was including immutable remote-tracking branches that clutter the log. Now uses `mutable() & trunk()..heads(trunk()..)` to show only mutable changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
- Add updatePRBase() to GitHub class for updating PR base branches - updateStackComments() now updates PR base when stack changes after merge - STATUS_TEMPLATE now includes 'empty' field, parsed correctly - navigateTop test updated to match new behavior (creates empty @ above stack) - STORIES.md: removed .array/config.json (fully stateless), merged duplicate sections, clarified arr create requires file changes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CLI for stacked PR management using JJ. Generally makes JJ easier to grasp.
Consists of a
corepackage and acliapp. The CLI is fairly thin, and all functionality occurs incore, so we can directly use that via the Array desktop app as well.