File tree 1 file changed +5
-1
lines changed
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) {
1545
1545
}
1546
1546
ctx .Data ["ShowMergeInstructions" ] = true
1547
1547
if pull .ProtectedBranch != nil {
1548
+ var showMergeInstructions bool
1549
+ if ctx .User != nil {
1550
+ showMergeInstructions = pull .ProtectedBranch .CanUserPush (ctx .User .ID )
1551
+ }
1548
1552
cnt := pull .ProtectedBranch .GetGrantedApprovalsCount (pull )
1549
1553
ctx .Data ["IsBlockedByApprovals" ] = ! pull .ProtectedBranch .HasEnoughApprovals (pull )
1550
1554
ctx .Data ["IsBlockedByRejection" ] = pull .ProtectedBranch .MergeBlockedByRejectedReview (pull )
@@ -1555,7 +1559,7 @@ func ViewIssue(ctx *context.Context) {
1555
1559
ctx .Data ["ChangedProtectedFiles" ] = pull .ChangedProtectedFiles
1556
1560
ctx .Data ["IsBlockedByChangedProtectedFiles" ] = len (pull .ChangedProtectedFiles ) != 0
1557
1561
ctx .Data ["ChangedProtectedFilesNum" ] = len (pull .ChangedProtectedFiles )
1558
- ctx .Data ["ShowMergeInstructions" ] = pull . ProtectedBranch . CanUserPush ( ctx . User . ID )
1562
+ ctx .Data ["ShowMergeInstructions" ] = showMergeInstructions
1559
1563
}
1560
1564
ctx .Data ["WillSign" ] = false
1561
1565
if ctx .User != nil {
You can’t perform that action at this time.
0 commit comments