From 57a69ef277546414893a38feb70412aa4c32330e Mon Sep 17 00:00:00 2001
From: Lanre Adelowo <adelowomailbox@gmail.com>
Date: Wed, 30 Jan 2019 18:20:40 +0100
Subject: don't allow pull requests to be created on an archived repository
 (#5883)

* don't allow pull requests to be created on an archived repository
Also disable the "PR" button if the repo is archived

* Refuse creating an issue/PR via API calls too
---
 templates/repo/home.tmpl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'templates')

diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index 735f6c00b9..d7161153cb 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -57,7 +57,7 @@
 		{{end}}
 		{{template "repo/sub_menu" .}}
 		<div class="ui stackable secondary menu mobile--margin-between-items mobile--no-negative-margins">
-			{{if and .PullRequestCtx.Allowed .IsViewBranch}}
+			{{if and .PullRequestCtx.Allowed .IsViewBranch (not .Repository.IsArchived)}}
 				<div class="fitted item">
 					<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch | EscapePound}}...{{ if .Repository.IsFork }}{{.Repository.Owner.Name}}{{ else }}{{ .SignedUserName }}{{ end }}:{{.BranchName | EscapePound}}">
 					<button class="ui green tiny compact button"><i class="octicon octicon-git-compare"></i></button>
-- 
cgit v1.2.3