Skip to content

feat(cli): add --dry-run flag to preview commit message without commi…#41

Merged
nirvik34 merged 1 commit into
nirvik34:mainfrom
syedahmedkhaderi:feat/dry-run-flag
May 19, 2026
Merged

feat(cli): add --dry-run flag to preview commit message without commi…#41
nirvik34 merged 1 commit into
nirvik34:mainfrom
syedahmedkhaderi:feat/dry-run-flag

Conversation

@syedahmedkhaderi

Copy link
Copy Markdown
Contributor

Closes #29

What changed

Added --dry-run as a new CLI option in bin/smartcommit.ts.

When passed, gitbun --dry-run runs the full staged-file analysis and
commit message generation pipeline exactly as normal — including optional
AI enhancement if --ai is also passed — but stops before the interactive
prompt. It prints the generated message to stdout and exits with code 0
without touching git.

The dryRun option is handled in src/index.ts as an early-exit check
immediately after message generation, so it cleanly bypasses both the
confirmation flow and the git commit call.

…tting

Adds a --dry-run option that runs the full analysis and message generation
pipeline, prints the resulting commit message to stdout, then exits with
code 0 — skipping the interactive prompt and git commit entirely. Closes nirvik34#29.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented May 19, 2026

Copy link
Copy Markdown

@syedahmedkhaderi is attempting to deploy a commit to the nirvik34's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@syedahmedkhaderi has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 50 minutes and 17 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f67983ee-a848-42f7-8427-76d2bc8a721d

📥 Commits

Reviewing files that changed from the base of the PR and between 158f38f and 9640dc5.

📒 Files selected for processing (2)
  • bin/smartcommit.ts
  • src/index.ts

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid enum value. Expected 'chill' | 'assertive', received 'professional' at "reviews.profile"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@nirvik34 nirvik34 merged commit ea7718f into nirvik34:main May 19, 2026
1 of 3 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@nirvik34 nirvik34 added type: feature Adds a new feature gssoc:approved Approved PR's under GSSOC level : beginner Good of beginners to start with mentor:nirvik34 and removed released labels May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Approved PR's under GSSOC level : beginner Good of beginners to start with mentor:nirvik34 type: feature Adds a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add a --dry-run CLI flag

2 participants