refactor: use enum for Repository.Type
1 file changed, 5 insertions(+), 1 deletion(-)
changed files
M internal/config/repository.go → internal/config/repository.go
@@ -13,7 +13,7 @@ GitHub ) type Repository struct { - Type string `toml:"" default:"github" comment:"Currently only 'github' is supported."` + Type RepoType `toml:"" default:"github" comment:"Currently only 'github' is supported."` Owner string Repo string Revision string `toml:"-"`@@ -43,3 +43,7 @@ *f, err = parseRepoType(string(text)) return err } + +func (f *RepoType) MarshalText() ([]byte, error) { + return []byte(f.String()), nil +}