fix: show "merge" form for empty PR (#39640)

fix #39637
This commit is contained in:
wxiaoguang authored and GitHub committed 2026-10-06 17:28:28 +00:00
1 parent 20ea3e204d
commit 26475404d4
2 files changed
+21 -2

No files matched your search

+2 -2
View File
@@ -112,7 +112,7 @@ func (prInfo *pullRequestViewInfo) prepareMergeBoxFormProps(ctx *context.Context
// if this pr can be merged now, then hide the auto merge
generalHideAutoMerge := prInfo.MergeBoxData.canMergeNow && allOverridableChecksOk
var mergeStyles []any
if pull.IsStatusMergeable() {
if pull.IsStatusMergeable() || pull.IsEmpty() {
mergeStyles = []any{
map[string]any{
"name": "merge",
@@ -176,7 +176,7 @@ func (prInfo *pullRequestViewInfo) prepareMergeBoxFormProps(ctx *context.Context
if len(mergeStyles) > 0 {
mergeFormProps["mergeStyles"] = mergeStyles
prInfo.MergeBoxData.MergeFormProps = mergeFormProps
} else if pull.IsStatusMergeable() {
} else if pull.IsStatusMergeable() || pull.IsEmpty() {
// no merge style was set in repo setting
prInfo.MergeBoxData.infoCommitBlockers.AddInfoItem(
svg.RenderHTML("octicon-x", 16, "tw-text-red"),