Pr recovery
pr_recovery
Shared recovery for an already-existing GitHub pull request.
When gh pr create fails because a PR already exists for the branch,
:class:~axm_git.tools.pr.GitPRTool recovers it via gh pr view. This
module factors that recovery into a result-agnostic helper.
PRRecovery
dataclass
Normalized result of recovering an existing pull request.
On success error is None and url/number are populated.
On failure error carries the reason and url/number are empty.
Source code in packages/axm-git/src/axm_git/core/pr_recovery.py
ok
property
Whether recovery succeeded.
is_already_exists(stderr)
Return True when stderr signals an existing PR (case-insensitive).
recover_existing_pr(working_dir)
Resolve the existing PR via gh pr view after an 'already exists' error.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
working_dir
|
Path
|
Repository working directory. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
PRRecovery
|
class: |
PRRecovery
|
success, or with |