Skip to content

CLI: Option to use JSON for the commit output #8382

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

Merged
merged 2 commits into from
May 3, 2025

Conversation

estib-vega
Copy link
Contributor

@estib-vega estib-vega commented May 3, 2025

Description

  • Refactor commit function for better maintainability.
  • Add use_json parameter to commit functions to support JSON output.
  • Enable JSON output mode via args.json CLI flag.

This is part 1 of 2 in a stack made with GitButler:

estib-vega added 2 commits May 3, 2025 10:55
Just for a better maintainability and easier updteability
- Add `use_json` parameter to commit functions in `command/commit.rs`.
- Output commit results as JSON when requested.
- Pass `args.json` from CLI to enable JSON output mode.
- Allow clippy::too_many_arguments for affected functions.

This enables machine-readable commit results for CLI consumers.
Copy link

vercel bot commented May 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gitbutler-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 3, 2025 9:01am
gitbutler-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 3, 2025 9:01am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant