Skip to content

Commit

Permalink
style: Fix ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundmiller committed Aug 5, 2024
1 parent f505310 commit 8152125
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions pulumi/github/teams/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import yaml

import pulumi
import pulumi_github as github


Expand All @@ -24,25 +23,29 @@ def setup_team(self, team, parent_team=None):

for user in members:
# Add a user to the newly created team
team_membership = github.TeamMembership(
# team_membership =
github.TeamMembership(
f"{team['name']}-{user['name']}",
team_id=team_resource,
username=user["name"],
role=user.get("role", "member"),
)
# TODO pulumi.export("team_membership",team_memebership.name)

for repo in team.get("repositories", []):
if not repo["name"] in self._repos:
if repo["name"] not in self._repos:
print(f"Repository '{repo['name']}' not managed by Pulumi. Skipping.")
continue

# Associate a repository with the team
team_repository = github.TeamRepository(
# team_repository =
github.TeamRepository(
f"{team['name']}-{repo['name']}",
team_id=team_resource,
repository=self._repos[repo["name"]],
permission=repo.get("permission", "pull"),
)
# TODO pulumi.export("team_repository",team_memebership.name)

for subteam in team.get("teams", []):
self.setup_team(subteam, parent_team=team_resource)
Expand Down Expand Up @@ -75,4 +78,4 @@ def __init__(self, org_file):
self.setup_team(team)


Organization("org.yaml")
Organization("org.yaml")

0 comments on commit 8152125

Please sign in to comment.