File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -577,6 +577,22 @@ func PrepareCompareDiff(
577577 ctx .Data ["AfterCommitID" ] = headCommitID
578578 ctx .Data ["ExpandNewPrForm" ] = ctx .FormBool ("expand" )
579579
580+ formTitle := ctx .FormString ("title" )
581+ formBody := ctx .FormString ("body" )
582+ quickPull := ctx .FormBool ("quick_pull" )
583+
584+ if formTitle != "" {
585+ ctx .Data ["TitleQuery" ] = formTitle
586+ }
587+
588+ if formBody != "" {
589+ ctx .Data ["BodyQuery" ] = formBody
590+ }
591+
592+ if ctx .Data ["ExpandNewPrForm" ] != true && (quickPull || formTitle != "" || formBody != "" ) {
593+ ctx .Data ["ExpandNewPrForm" ] = true
594+ }
595+
580596 if (headCommitID == ci .CompareInfo .MergeBase && ! ci .DirectComparison ) ||
581597 headCommitID == ci .CompareInfo .BaseCommitID {
582598 ctx .Data ["IsNothingToCompare" ] = true
You can’t perform that action at this time.
0 commit comments