Skip to content

Commit fc83213

Browse files
committed
add permission check
1 parent 660120f commit fc83213

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

templates/repo/code/upstream_diverging_info.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
{{$upstreamHtml := HTMLFormat `<a href="%s">%s:%s</a>` $upstreamLink .Repository.BaseRepo.FullName .BranchName}}
66
{{ctx.Locale.TrN .UpstreamDivergingInfo.CommitsBehind "repo.pulls.upstream_diverging_prompt_behind_1" "repo.pulls.upstream_diverging_prompt_behind_n" .UpstreamDivergingInfo.CommitsBehind $upstreamHtml}}
77
</div>
8+
{{if .CanWriteCode}}
89
<button class="ui compact green button tw-m-0 link-action" data-url="{{.Repository.Link}}/branches/merge-upstream?branch={{.BranchName}}">
910
{{ctx.Locale.Tr "repo.pulls.upstream_diverging_merge"}}
1011
</button>
12+
{{end}}
1113
</div>
1214
{{end}}

0 commit comments

Comments
 (0)