File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -840,7 +840,7 @@ func SearchRepoTree(ctx *webcontext.Context) {
840
840
pattern = "*"
841
841
}
842
842
var depth int64
843
- depth = 5
843
+ depth = conf . GitRepoTreeSearchDepth ()
844
844
commit , err := ctx .Repository .GetCommitByAny (ref )
845
845
if err != nil {
846
846
ctx .Abort (err )
Original file line number Diff line number Diff line change @@ -50,9 +50,10 @@ type Conf struct {
50
50
GitGCCronExpression string `env:"GIT_GC_CRON_EXPRESSION" default:"0 0 1 * * ?"`
51
51
52
52
// ory/kratos config
53
- OryEnabled bool `default:"false" env:"ORY_ENABLED"`
54
- OryKratosAddr string `default:"kratos-public" env:"ORY_KRATOS_ADDR"`
55
- OryKratosPrivateAddr string `default:"kratos-admin" env:"ORY_KRATOS_ADMIN_ADDR"`
53
+ OryEnabled bool `default:"false" env:"ORY_ENABLED"`
54
+ OryKratosAddr string `default:"kratos-public" env:"ORY_KRATOS_ADDR"`
55
+ OryKratosPrivateAddr string `default:"kratos-admin" env:"ORY_KRATOS_ADMIN_ADDR"`
56
+ GitRepoTreeSearchDepth int64 `default:"5" env:"GIT_REPO_TREE_SEARCH_DEPTH"`
56
57
}
57
58
58
59
var cfg Conf
@@ -190,3 +191,7 @@ func OryCompatibleClientSecret() string {
190
191
func OryKratosPrivateAddr () string {
191
192
return cfg .OryKratosPrivateAddr
192
193
}
194
+
195
+ func GitRepoTreeSearchDepth () int64 {
196
+ return cfg .GitRepoTreeSearchDepth
197
+ }
You can’t perform that action at this time.
0 commit comments