Skip to content

Commit

Permalink
zoekt-indexserver: handle gerrit-mirror RepoNameFormat config
Browse files Browse the repository at this point in the history
  • Loading branch information
xavier-calland committed Apr 30, 2024
1 parent 68d0465 commit d829a33
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/zoekt-indexserver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ type ConfigEntry struct {
ExcludeTopics []string
Active bool
NoArchived bool
RepoNameFormat string
}

func randomize(entries []ConfigEntry) []ConfigEntry {
Expand Down Expand Up @@ -259,6 +260,9 @@ func executeMirror(cfg []ConfigEntry, repoDir string, pendingRepos chan<- string
if c.Active {
cmd.Args = append(cmd.Args, "-active")
}
if c.RepoNameFormat != "" {
cmd.Args = append(cmd.Args, "-repo-name-format", c.RepoNameFormat)
}
cmd.Args = append(cmd.Args, c.GerritApiURL)
} else {
log.Printf("executeMirror: ignoring config, because it does not contain any valid repository definition: %v", c)
Expand Down

0 comments on commit d829a33

Please sign in to comment.