Module utils

Module utils 

Source
Expand description

Copyright (c) 2025 Hangzhou Guanwaii Technology Co., Ltd.

This source code is licensed under the MIT License, which is located in the LICENSE file in the source tree’s root directory.

File: utils.rs Author: mingcheng mingcheng@apache.org File Created: 2025-10-21 11:34:11

Modified By: mingcheng mingcheng@apache.org Last Modified: 2025-11-07 11:22:27

Enums§

OutputFormat
Output format for commit messages

Functions§

check_env_variables
Check and print all relevant environment variables
format_openai_error
Convert OpenAI error to user-friendly error message
get_env
Get environment variable with default value fallback
get_env_bool
Parse boolean environment variable Accepts “1”, “true”, “yes”, “on” (case-insensitive) as true
print_table
Print the commit message in a table format
save_to_file
Save content to a file
should_signoff
Check if commit should be signed off Returns true if either CLI flag is set or repository/git config/env enable sign-off