From afb01658ab3e7ed0f2685dbfaeba20447aed0690 Mon Sep 17 00:00:00 2001 From: Edoardo Rosa <6991986+notdodo@users.noreply.github.com> Date: Sat, 5 Apr 2025 18:43:54 +0200 Subject: [PATCH 1/2] fix: ci errors, close #16 --- __main__.py | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/__main__.py b/__main__.py index a9bebb4..45a0915 100644 --- a/__main__.py +++ b/__main__.py @@ -1,5 +1,7 @@ """A GitHub Python Pulumi program.""" +from __future__ import annotations + from dataclasses import dataclass from enum import StrEnum @@ -34,25 +36,39 @@ class Roles(StrEnum): + """GitHub roles for a team member.""" + ADMIN = "maintainer" MEMBER = "member" @dataclass class Member: + """GitHub team's member.""" + username: str role: Roles class Team(pulumi.ComponentResource): + """ + A Pulumi component resource to create a GitHub team with customizable options. + + :param name [str]: The name of the team to create. + :param description [str | None]: A short description of the team. + :param members list[Member]: A list of the Members for the team. + :param opts [pulumi.ResourceOptions | None]: Pulumi resource options for the custom resource. + """ + def __init__( self, - team_name: str, + name: str, members: list[Member], description: str | None = "", - opts: pulumi.ResourceOptions = None, + opts: pulumi.ResourceOptions | None = None, ) -> None: - self.resource_name = team_name.lower().replace(" ", "-") + """Initialize the Team class.""" + self.resource_name = name.lower().replace(" ", "-") super().__init__( "sredipity-lab::github::TeamWithMembers", self.resource_name, @@ -61,7 +77,7 @@ def __init__( ) self.team = github.Team( f"{self.resource_name}-team", - name=team_name, + name=name, description=description, create_default_maintainer=False, privacy="closed", From 9f486ebc53a3907a1503fbeecbaab1b087f5a286 Mon Sep 17 00:00:00 2001 From: Edoardo Rosa <6991986+notdodo@users.noreply.github.com> Date: Sat, 5 Apr 2025 18:45:30 +0200 Subject: [PATCH 2/2] fix: ci --- .github/workflows/python-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 0b6bbc9..b57d7ae 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -4,8 +4,6 @@ on: branches: - main pull_request: - paths: - - .github/workflows/python-ci.yml concurrency: group: ghas-github-pulumi-ci-${{ github.ref }}