feat(ssh): create pull requests over AGit in ssh-only mode #347

Merged
hexajon merged 1 commit from issue-327-agit-pr-creation into main 2026-07-22 18:34:47 +00:00
hexajon commented 2026-07-22 18:18:28 +00:00 (Migrated from codeberg.org)

Summary

In ssh-only mode finish creates the PR entirely over SSH via Forgejo's AGit flow - git push HEAD:refs/for/ with push options - instead of degrading at PR-create. The push reuses the token-less SSH transport (no GIT_ASKPASS, no token on the wire). The topic is derived deterministically from the local branch name so every re-push updates the same PR; title and description ride the create push only. The PR number is parsed tolerantly from the push stderr and degrades to a check-the-forge note rather than failing finish if the format shifts. Only topic/title/description/force-push options are emitted, pinned by test. Scope is create/update only: the merge step still needs the REST API and degrades in ssh-only, and a non-fast-forward push teaches the force-push remedy rather than forcing silently. Branch-detected issues are referenced, not closed - the dependency-safety check needs the API ssh-only lacks, so closing blindly could retire an epic with open children; the run prints that it skipped auto-close and an explicit --closes still closes. After an AGit merge there is no topic branch to delete, so the cleanup legs skip with a note. Token and https modes are unchanged.

Closes #327.

Closes #327

## Summary In ssh-only mode finish creates the PR entirely over SSH via Forgejo's AGit flow - git push HEAD:refs/for/<base> with push options - instead of degrading at PR-create. The push reuses the token-less SSH transport (no GIT_ASKPASS, no token on the wire). The topic is derived deterministically from the local branch name so every re-push updates the same PR; title and description ride the create push only. The PR number is parsed tolerantly from the push stderr and degrades to a check-the-forge note rather than failing finish if the format shifts. Only topic/title/description/force-push options are emitted, pinned by test. Scope is create/update only: the merge step still needs the REST API and degrades in ssh-only, and a non-fast-forward push teaches the force-push remedy rather than forcing silently. Branch-detected issues are referenced, not closed - the dependency-safety check needs the API ssh-only lacks, so closing blindly could retire an epic with open children; the run prints that it skipped auto-close and an explicit --closes still closes. After an AGit merge there is no topic branch to delete, so the cleanup legs skip with a note. Token and https modes are unchanged. Closes #327. Closes #327
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea!347
No description provided.