config: add repo.ignore
Thu, 22 Dec 2022
4 files changed,
60 insertions(+),
10 deletions(-)
M
config/config.go
@@ -12,6 +12,7 @@ Repo struct {
ScanPath string `yaml:"scanPath"` Readme []string `yaml:"readme"` MainBranch []string `yaml:"mainBranch"` + Ignore []string `yaml:"ignore,omitempty"` } `yaml:"repo"` Dirs struct { Templates string `yaml:"templates"`
M
readme
@@ -39,6 +39,9 @@ - README.md
mainBranch: - master - main + ignore: + - foo + - bar dirs: templates: ./templates static: ./static@@ -56,6 +59,7 @@ • repo.scanPath: where all your git repos live (or die). legit doesn't
traverse subdirs yet.
… preview truncated
M
routes/routes.go
@@ -35,6 +35,10 @@
infos := []info{} for _, dir := range dirs { + if d.isIgnored(dir.Name()) { + continue + } + path := filepath.Join(d.c.Repo.ScanPath, dir.Name()) gr, err := git.Open(path, "") if err != nil {
… preview truncated
… and 1 more changed files not shown in this preview