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§
- PrCreate
Error - Errors that can occur during PR creation.
Functions§
- auto_
commit - Commit what the agent left, with the tool the repository uses (see
commit). - 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.
- is_
missing_ remote_ ref_ error - is_
transient_ network_ error - True when a push failure looks like a transient network error (dial
timeout, i/o timeout, connection reset) rather than a ref rejection.
A refused ref must not be retried, but a blipped endpoint deserves one
immediate retry before the run is classified as
push_failed. - 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§
- PrCreate
Result - Result type for PR creation operations.