Skip to content

Commit

Permalink
Merge pull request #15 from simahawk/fix
Browse files Browse the repository at this point in the history
Fix bootstrap_data
  • Loading branch information
simahawk authored Nov 19, 2023
2 parents 91c9d8c + f07dded commit 5c2e80d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/bootstrap_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def prepare_repo(gh_org, conf_dir, whitelist=None):
os.makedirs(dest_dir.as_posix())
by_category = {}
teams = []
for repo in gh_org.repositories():
for repo in sorted(gh_org.repositories(), key=lambda x: x.name):
if repo.name in (".github", "repo-maintainer", "repo-maintainer-conf"):
continue
if whitelist and not any([repo.name.startswith(x) for x in whitelist]):
Expand All @@ -78,11 +78,15 @@ def prepare_repo(gh_org, conf_dir, whitelist=None):
psc_rep = "board"
try:
for team in repo.teams():
if "core" in team.slug:
continue
if "maintainers" in team.slug and "representative" not in team.slug:
psc = team.slug
teams.append(psc)
continue
if "maintainers" in team.slug and "representative" in team.slug:
psc_rep = team.slug
teams.append(psc_rep)
continue
except github3.exceptions.NotFoundError:
pass
Expand All @@ -100,8 +104,6 @@ def prepare_repo(gh_org, conf_dir, whitelist=None):
"branches": branches,
"default_branch": repo.default_branch,
}
teams.append(psc)
teams.append(psc_rep)

for category_slug, repos in by_category.items():
with open(dest_dir / f"{category_slug}.yml", "w") as f:
Expand Down

0 comments on commit 5c2e80d

Please sign in to comment.