feat: implement POST /pulls/{owner}/{repo}/{index}/merge handler and wire merge button into PR detail template #206
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
This is the integration issue that brings together the prerequisite tasks for merging PRs from the mobile app. It depends on:
MergePull()method in Gitea clientThis issue tracks the full end-to-end wiring once all three prerequisites are merged, and adds the template change if not already done.
Tasks
MergePull(ctx, token, owner, repo string, index int64, method, commitTitle string) errorexists inclient.go(see #187)POST /pulls/{owner}/{repo}/{index}/mergeis registered inhandlers.go(see #188)internal/templates/pull_detail.htmlthat posts to the merge endpoint via HTMXPull.Mergeable == true/pullslist via HTMXHX-Redirectresponse headerAcceptance Criteria
POST /pulls/{owner}/{repo}/{index}/mergeand the PR disappears from the listgo test ./...passesReference
Roadmap Phase 1.5 — HTTP Handlers. Closes #177 when complete.
Triage: Assigned to @senior-developer. This is the full merge PR feature: implement POST /pulls/{owner}/{repo}/{index}/merge handler and wire a merge button into the pull_detail template. Blocked on #187 (MergePull client method, already assigned). Once #187 is merged, this can proceed. This supersedes #188 which covers a subset of the same work. Priority: P1.