diff options
Diffstat (limited to 'routers/web/repo/http.go')
-rw-r--r-- | routers/web/repo/http.go | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/routers/web/repo/http.go b/routers/web/repo/http.go index cc44c8e7e4..a52d9b76c2 100644 --- a/routers/web/repo/http.go +++ b/routers/web/repo/http.go @@ -27,6 +27,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" + repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" @@ -204,21 +205,21 @@ func httpBase(ctx *context.Context) (h *serviceHandler) { } environ = []string{ - models.EnvRepoUsername + "=" + username, - models.EnvRepoName + "=" + reponame, - models.EnvPusherName + "=" + ctx.Doer.Name, - models.EnvPusherID + fmt.Sprintf("=%d", ctx.Doer.ID), - models.EnvAppURL + "=" + setting.AppURL, + repo_module.EnvRepoUsername + "=" + username, + repo_module.EnvRepoName + "=" + reponame, + repo_module.EnvPusherName + "=" + ctx.Doer.Name, + repo_module.EnvPusherID + fmt.Sprintf("=%d", ctx.Doer.ID), + repo_module.EnvAppURL + "=" + setting.AppURL, } if !ctx.Doer.KeepEmailPrivate { - environ = append(environ, models.EnvPusherEmail+"="+ctx.Doer.Email) + environ = append(environ, repo_module.EnvPusherEmail+"="+ctx.Doer.Email) } if isWiki { - environ = append(environ, models.EnvRepoIsWiki+"=true") + environ = append(environ, repo_module.EnvRepoIsWiki+"=true") } else { - environ = append(environ, models.EnvRepoIsWiki+"=false") + environ = append(environ, repo_module.EnvRepoIsWiki+"=false") } } @@ -269,7 +270,7 @@ func httpBase(ctx *context.Context) (h *serviceHandler) { } } - environ = append(environ, models.EnvRepoID+fmt.Sprintf("=%d", repo.ID)) + environ = append(environ, repo_module.EnvRepoID+fmt.Sprintf("=%d", repo.ID)) w := ctx.Resp r := ctx.Req |