summaryrefslogtreecommitdiff
path: root/repoNew.go
diff options
context:
space:
mode:
Diffstat (limited to 'repoNew.go')
-rw-r--r--repoNew.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/repoNew.go b/repoNew.go
index 09ce519..14c8106 100644
--- a/repoNew.go
+++ b/repoNew.go
@@ -50,13 +50,13 @@ func (f *Forge) AddNamespaceDir(ns string, fullpath string) (*gitpb.Repo, error)
log.Info("WARNING. NEW FAILED", fullpath)
return nil, err
}
- // slices.Reverse(f.Repos.Repos)
- // repo.URL = url
f.VerifyBranchNames(repo)
repo.Reload()
- if err := repo.ValidateUTF8(); err != nil {
- return repo, err
+
+ // set the readonly flag based on the users' forge config
+ if f.Config.IsReadOnly(repo.GetGoPath()) {
+ repo.ReadOnly = true
}
return repo, nil
}