Skip to main content

Module git_ops

Module git_ops 

Source
Expand description

Git operations — auto-commit, push, PR creation.

These run after the agent completes to ensure all changes are committed, pushed, and a PR is created.

All GitHub API operations use GhHttp exclusively. The gh CLI is not used as a fallback to ensure consistent behavior across environments and simplify testing.

Enums§

PrCreateError
Errors that can occur during PR creation.

Functions§

auto_commit
Auto-commit any uncommitted changes.
count_changed_files
Count the number of changed files in the working directory.
create_pr_if_needed
Create a PR if one doesn’t already exist.
has_changes
Check if there are uncommitted changes in the working directory.
has_commits_ahead
Check if the current branch has any commits ahead of the default branch.
push_branch
Push the branch to origin.
rebase_on_branch
Rebase the current branch on top of origin/{branch}.
rebase_on_default
Rebase the current branch on the default branch.

Type Aliases§

PrCreateResult
Result type for PR creation operations.