resolve issue #280 interactive commit fix: resolve commit suggestion issue - #290
resolve issue #280 interactive commit fix: resolve commit suggestion issue#290Aryanboii wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: Comment |
|
There was a problem hiding this comment.
2 issues found across 1 file
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/commands/suggest.ts">
<violation number="1" location="src/commands/suggest.ts:391">
P3: The new staged-change guard is misindented (2-space indent and `} else {` at column 0 inside a 6-space nesting), so `npm run format:check` fails and the PR cannot pass the format gate. Reindent the block to match the surrounding nesting.</violation>
<violation number="2" location="src/commands/suggest.ts:391">
P2: The new `if (!diffResult.staged)` block and its closing `} else {` are indented at column 0 instead of inside the enclosing `if (shouldCommit)` block, breaking the repo's Prettier convention. `npx prettier src/commands/suggest.ts` reformats lines 391-396, and `npm run format:check` will fail on this file. Indent the block and closing brace to 8 spaces.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| if (!diffResult.staged) { | ||
| outro(pc.red('Commit requires staged changes. Stage your changes with `git add` and try again.')); | ||
| return; | ||
| } | ||
| await acceptAndCommit(selected, config, diffResult.diff); | ||
| } else { |
There was a problem hiding this comment.
P2: The new if (!diffResult.staged) block and its closing } else { are indented at column 0 instead of inside the enclosing if (shouldCommit) block, breaking the repo's Prettier convention. npx prettier src/commands/suggest.ts reformats lines 391-396, and npm run format:check will fail on this file. Indent the block and closing brace to 8 spaces.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/commands/suggest.ts, line 391:
<comment>The new `if (!diffResult.staged)` block and its closing `} else {` are indented at column 0 instead of inside the enclosing `if (shouldCommit)` block, breaking the repo's Prettier convention. `npx prettier src/commands/suggest.ts` reformats lines 391-396, and `npm run format:check` will fail on this file. Indent the block and closing brace to 8 spaces.</comment>
<file context>
@@ -388,8 +388,12 @@ export async function suggestCommand(
if (shouldCommit) {
- await acceptAndCommit(selected, config, diffResult.diff);
- } else {
+ if (!diffResult.staged) {
+ outro(pc.red('Commit requires staged changes. Stage your changes with `git add` and try again.'));
+ return;
</file context>
| if (!diffResult.staged) { | |
| outro(pc.red('Commit requires staged changes. Stage your changes with `git add` and try again.')); | |
| return; | |
| } | |
| await acceptAndCommit(selected, config, diffResult.diff); | |
| } else { | |
| if (!diffResult.staged) { | |
| outro(pc.red('Commit requires staged changes. Stage your changes with `git add` and try again.')); | |
| return; | |
| } | |
| await acceptAndCommit(selected, config, diffResult.diff); | |
| } else { |
| if (shouldCommit) { | ||
| await acceptAndCommit(selected, config, diffResult.diff); | ||
| } else { | ||
| if (!diffResult.staged) { |
There was a problem hiding this comment.
P3: The new staged-change guard is misindented (2-space indent and } else { at column 0 inside a 6-space nesting), so npm run format:check fails and the PR cannot pass the format gate. Reindent the block to match the surrounding nesting.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/commands/suggest.ts, line 391:
<comment>The new staged-change guard is misindented (2-space indent and `} else {` at column 0 inside a 6-space nesting), so `npm run format:check` fails and the PR cannot pass the format gate. Reindent the block to match the surrounding nesting.</comment>
<file context>
@@ -388,8 +388,12 @@ export async function suggestCommand(
if (shouldCommit) {
- await acceptAndCommit(selected, config, diffResult.diff);
- } else {
+ if (!diffResult.staged) {
+ outro(pc.red('Commit requires staged changes. Stage your changes with `git add` and try again.'));
+ return;
</file context>
404-Page-Found
left a comment
There was a problem hiding this comment.
Cubic bot comments



Summary
npm run testFixes #280