aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorAnirudh Oppiliappan <x@icyphox.sh>2022-12-13 09:58:40 +0530
committerAnirudh Oppiliappan <x@icyphox.sh>2022-12-13 09:58:40 +0530
commiteda8b58d9f2e85f1bae92ce3b70f279b89031046 (patch)
tree8b365320501fbbcac08f7abb9087eaef9c9b2711 /config
parentdeps: bump go-git (diff)
downloadlegitrx-eda8b58d9f2e85f1bae92ce3b70f279b89031046.tar.gz
legitrx-eda8b58d9f2e85f1bae92ce3b70f279b89031046.tar.zst
legitrx-eda8b58d9f2e85f1bae92ce3b70f279b89031046.zip
git: find main branch from config
Diffstat (limited to '')
-rw-r--r--config.yaml5
-rw-r--r--config/config.go11
2 files changed, 10 insertions, 6 deletions
diff --git a/config.yaml b/config.yaml
index f684779..59e903a 100644
--- a/config.yaml
+++ b/config.yaml
@@ -1,10 +1,13 @@
-git:
+repo:
scanPath: /home/icy/code/tmp/testrepos
readme:
- readme
- README
- readme.md
- README.md
+ mainBranch:
+ - master
+ - main
template:
dir: ./templates
meta:
diff --git a/config/config.go b/config/config.go
index 1a29e4f..278e17e 100644
--- a/config/config.go
+++ b/config/config.go
@@ -8,10 +8,11 @@ import (
)
type Config struct {
- Git struct {
- ScanPath string `yaml:"scanPath"`
- Readme []string `yaml:"readme"`
- } `yaml:"git"`
+ Repo struct {
+ ScanPath string `yaml:"scanPath"`
+ Readme []string `yaml:"readme"`
+ MainBranch []string `yaml:"mainBranch"`
+ } `yaml:"repo"`
Template struct {
Dir string `yaml:"dir"`
} `yaml:"template"`
@@ -21,7 +22,7 @@ type Config struct {
} `yaml:"meta"`
Server struct {
Host string `yaml:"host"`
- Port int `yaml:"port"`
+ Port int `yaml:"port"`
} `yaml:"server"`
}