forked from forgejo/forgejo
Implementation of the feature to redirect to an external issue tracker
This commit is contained in:
parent
4a5faecd8f
commit
8dc49dc114
7 changed files with 18 additions and 3 deletions
|
@ -52,10 +52,15 @@ var (
|
|||
)
|
||||
|
||||
func MustEnableIssues(ctx *context.Context) {
|
||||
if !ctx.Repo.Repository.EnableIssues || ctx.Repo.Repository.EnableExternalTracker {
|
||||
if !ctx.Repo.Repository.EnableIssues {
|
||||
ctx.Handle(404, "MustEnableIssues", nil)
|
||||
return
|
||||
}
|
||||
|
||||
if ctx.Repo.Repository.EnableExternalTracker {
|
||||
ctx.Redirect(ctx.Repo.Repository.ExternalTrackerURL)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func MustAllowPulls(ctx *context.Context) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue