File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1545,6 +1545,10 @@ func ViewIssue(ctx *context.Context) {
15451545 }
15461546 ctx .Data ["ShowMergeInstructions" ] = true
15471547 if pull .ProtectedBranch != nil {
1548+ var showMergeInstructions bool
1549+ if ctx .User != nil {
1550+ showMergeInstructions = pull .ProtectedBranch .CanUserPush (ctx .User .ID )
1551+ }
15481552 cnt := pull .ProtectedBranch .GetGrantedApprovalsCount (pull )
15491553 ctx .Data ["IsBlockedByApprovals" ] = ! pull .ProtectedBranch .HasEnoughApprovals (pull )
15501554 ctx .Data ["IsBlockedByRejection" ] = pull .ProtectedBranch .MergeBlockedByRejectedReview (pull )
@@ -1555,7 +1559,7 @@ func ViewIssue(ctx *context.Context) {
15551559 ctx .Data ["ChangedProtectedFiles" ] = pull .ChangedProtectedFiles
15561560 ctx .Data ["IsBlockedByChangedProtectedFiles" ] = len (pull .ChangedProtectedFiles ) != 0
15571561 ctx .Data ["ChangedProtectedFilesNum" ] = len (pull .ChangedProtectedFiles )
1558- ctx .Data ["ShowMergeInstructions" ] = pull . ProtectedBranch . CanUserPush ( ctx . User . ID )
1562+ ctx .Data ["ShowMergeInstructions" ] = showMergeInstructions
15591563 }
15601564 ctx .Data ["WillSign" ] = false
15611565 if ctx .User != nil {
You can’t perform that action at this time.
0 commit comments