Skip to main content

commit_and_push_pr_fixes

Function commit_and_push_pr_fixes 

Source
pub fn commit_and_push_pr_fixes(
    pr_number: u32,
    commit_enabled: bool,
    push_enabled: bool,
) -> Result<(Option<CommitResult>, Option<PushResult>)>
Expand description

Commit and optionally push PR review fixes

This function:

  1. Checks if there are uncommitted changes
  2. Stages all changes
  3. Creates a commit with the given message
  4. Optionally pushes to remote if push_enabled is true

§Arguments

  • pr_number - The PR number for the commit message
  • commit_enabled - Whether to create a commit (from config)
  • push_enabled - Whether to push after commit (from config)

§Returns

Tuple of (commit_result, push_result) where push_result is None if push was skipped