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

Configure Feed

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

dev: set fork, public, archived based on sentinel files (#161)

This lets us test changes to metadata while running Zoekt against a
fake instance of Sourcegraph.

Touching a file "SG_*" in the repo's root will set the corresonding
property in the response of getIndexOptions.

author
Stefan Hengl
committer
GitHub
date (Sep 27, 2021, 10:29 AM +0200) commit 907d4911 parent bee74c28
+9
+9
cmd/zoekt-sourcegraph-indexserver/sg.go
··· 160 160 }} 161 161 } 162 162 163 + if _, err := os.Stat(filepath.Join(dir, "SG_PRIVATE")); err == nil { 164 + opts.Public = false 165 + } 166 + if _, err := os.Stat(filepath.Join(dir, "SG_FORK")); err == nil { 167 + opts.Fork = true 168 + } 169 + if _, err := os.Stat(filepath.Join(dir, "SG_ARCHIVED")); err == nil { 170 + opts.Archived = true 171 + } 163 172 return opts, nil 164 173 } 165 174