diff --git a/config/auth.go b/config/auth.go index 0bbcaa6e1dbaaebc7ac1d3ec966a709bc540d3b4..ff1d3c0567a75b42535a68ddf54789a8994c2917 100644 --- a/config/auth.go +++ b/config/auth.go @@ -120,6 +120,11 @@ OUT: if anon > ac { ac = anon } + for _, c := range r.Collabs { + if c == u.Name { + return ac + } + } for _, rr := range u.CollabRepos { if rr == r.Repo { return ac diff --git a/config/config.go b/config/config.go index da6ff3e5d0c9d657e7d3e8c01d89197350c54946..40b77d1339cf425df810c4314135c7cde80e5621 100644 --- a/config/config.go +++ b/config/config.go @@ -51,11 +51,12 @@ type User struct { // RepoConfig is a repository configuration. type RepoConfig struct { - Name string `yaml:"name" json:"name"` - Repo string `yaml:"repo" json:"repo"` - Note string `yaml:"note" json:"note"` - Private bool `yaml:"private" json:"private"` - Readme string `yaml:"readme" json:"readme"` + Name string `yaml:"name" json:"name"` + Repo string `yaml:"repo" json:"repo"` + Note string `yaml:"note" json:"note"` + Private bool `yaml:"private" json:"private"` + Readme string `yaml:"readme" json:"readme"` + Collabs []string `yaml:"collabs" json:"collabs"` } // NewConfig creates a new internal Config struct.