@@ -66,7 +66,7 @@ def dumps(self, filename=None):
66
66
json .dump ({
67
67
'teams' : [self ._teams [name ].dumps () for name in self .teams ],
68
68
'repos' : [self ._repos [name ].dumps () for name in self .repos ],
69
- }, f )
69
+ }, f , indent = 4 )
70
70
f .close ()
71
71
72
72
def is_url (self , url ):
@@ -139,13 +139,14 @@ def parse(self, data):
139
139
self ._teams [name ] = Team (name , permission ,
140
140
members = members , repos = repos )
141
141
142
- # add repos to teams (defined with repo: section
143
- for section in config .sections ():
144
- if section .startswith ('repo:' ):
145
- repos = [section [len ('repo:' ):]]
146
- if config .has_option (section , 'team' ):
147
- for team in config .get (section , 'team' ).split ():
148
- self ._teams [TEAM_PREFIX + team ].repos .update (repos )
142
+ # add repos to teams (defined with repo: section
143
+ for section in config .sections ():
144
+ if section .startswith ('repo:' ):
145
+ if config .has_option (section , 'teams' ):
146
+ for team in config .get (section , 'teams' ).split ():
147
+ self ._teams [TEAM_PREFIX + team ].repos .add (
148
+ section [len ('repo:' ):],
149
+ )
149
150
150
151
class ConfigGithub (Config ):
151
152
0 commit comments