1
0
Fork 0
forked from forgejo/forgejo

Unified link creation. (#15619)

This commit is contained in:
KN4CK3R 2021-04-30 19:25:13 +02:00 committed by GitHub
parent 1456978246
commit c80d7f33b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 27 additions and 24 deletions

View file

@ -201,7 +201,7 @@ func ForkPost(ctx *context.Context) {
}
repo, has := models.HasForkedRepo(ctxUser.ID, traverseParentRepo.ID)
if has {
ctx.Redirect(setting.AppSubURL + "/" + ctxUser.Name + "/" + repo.Name)
ctx.Redirect(ctxUser.HomeLink() + "/" + repo.Name)
return
}
if !traverseParentRepo.IsFork {
@ -243,7 +243,7 @@ func ForkPost(ctx *context.Context) {
}
log.Trace("Repository forked[%d]: %s/%s", forkRepo.ID, ctxUser.Name, repo.Name)
ctx.Redirect(setting.AppSubURL + "/" + ctxUser.Name + "/" + repo.Name)
ctx.Redirect(ctxUser.HomeLink() + "/" + repo.Name)
}
func checkPullInfo(ctx *context.Context) *models.Issue {