fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

cmd/zoekt-indexserver: configurable credentials path

This change makes credential paths configurable from the indexserver allowing us to index multiple instances of the same git hosting service.

Change-Id: I53770423d232f4d9da5335282f7fa77b6e1d7440

+10
+10
cmd/zoekt-indexserver/config.go
··· 38 38 GitilesURL string 39 39 CGitURL string 40 40 BitBucketServerURL string 41 + CredentialPath string 41 42 ProjectType string 42 43 Name string 43 44 Exclude string ··· 174 175 if c.Exclude != "" { 175 176 cmd.Args = append(cmd.Args, "-exclude", c.Exclude) 176 177 } 178 + if c.CredentialPath != "" { 179 + cmd.Args = append(cmd.Args, "-token", c.CredentialPath) 180 + } 177 181 } else if c.GitilesURL != "" { 178 182 cmd = exec.Command("zoekt-mirror-gitiles", 179 183 "-dest", repoDir, "-name", c.Name) ··· 204 208 if c.Exclude != "" { 205 209 cmd.Args = append(cmd.Args, "-exclude", c.Exclude) 206 210 } 211 + if c.CredentialPath != "" { 212 + cmd.Args = append(cmd.Args, "-credentials", c.CredentialPath) 213 + } 207 214 } else if c.GitLabURL != "" { 208 215 cmd = exec.Command("zoekt-mirror-gitlab", 209 216 "-dest", repoDir, "-url", c.GitLabURL) ··· 215 222 } 216 223 if c.OnlyPublic { 217 224 cmd.Args = append(cmd.Args, "-public") 225 + } 226 + if c.CredentialPath != "" { 227 + cmd.Args = append(cmd.Args, "-token", c.CredentialPath) 218 228 } 219 229 } 220 230