Skip to main content

auto_commit_changes

Function auto_commit_changes 

Source
pub fn auto_commit_changes(
    path: impl AsRef<Path>,
    loop_id: &str,
) -> Result<AutoCommitResult, GitOpsError>
Expand description

Auto-commit any uncommitted changes in the repository.

This stages all changes (untracked, staged, unstaged) and creates a commit with a standardized message. If there are no uncommitted changes, returns without creating a commit.

§Arguments

  • path - Path to the git repository (or worktree)
  • loop_id - The loop ID to include in the commit message

§Returns

Information about what was committed, or an error if the operation failed.

§Commit Message Format

The commit message follows the format: chore: auto-commit before merge (loop {loop_id})