diff --git a/appview/pages/templates/repo/pulls/fragments/pullComposeHost.html b/appview/pages/templates/repo/pulls/fragments/pullComposeHost.html index c3e75d63..05bc37bc 100644 --- a/appview/pages/templates/repo/pulls/fragments/pullComposeHost.html +++ b/appview/pages/templates/repo/pulls/fragments/pullComposeHost.html @@ -16,7 +16,8 @@ hx-post="/{{ .RepoInfo.FullName }}/pulls/new" hx-trigger="submit, keydown[(ctrlKey || metaKey) && key=='Enter'] from:(#patch,#title,#body)" hx-indicator="#create-pull-spinner" - hx-swap="none" + hx-target="body" + hx-swap="innerHTML show:top" class="flex flex-col gap-6" >
diff --git a/appview/pulls/create.go b/appview/pulls/create.go index da54669e..690c71ff 100644 --- a/appview/pulls/create.go +++ b/appview/pulls/create.go @@ -335,7 +335,7 @@ func (s *Pulls) createPullRequest( s.applyCreationLabels(r.Context(), client, userDid, []*models.Pull{pull}, r.Form, repo) ownerSlashRepo := reporesolver.GetBaseRepoPath(r, repo) - s.pages.HxLocation(w, fmt.Sprintf("/%s/pulls/%d", ownerSlashRepo, pullId)) + http.Redirect(w, r, fmt.Sprintf("/%s/pulls/%d", ownerSlashRepo, pullId), http.StatusFound) } func (s *Pulls) createStackedPullRequest( @@ -452,7 +452,7 @@ func (s *Pulls) createStackedPullRequest( s.applyCreationLabels(r.Context(), client, userDid, stack, r.Form, repo) ownerSlashRepo := reporesolver.GetBaseRepoPath(r, repo) - s.pages.HxLocation(w, fmt.Sprintf("/%s/pulls", ownerSlashRepo)) + http.Redirect(w, r, fmt.Sprintf("/%s/pulls", ownerSlashRepo), http.StatusFound) } func (s *Pulls) newStack(