Skip to content

Commit 2bfc100

Browse files
authored
Merge pull request #916 from opsmill/stable
stable to develop
2 parents a9a6893 + 70202d4 commit 2bfc100

2 files changed

Lines changed: 16 additions & 9 deletions

File tree

infrahub_sdk/schema/repository.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,21 +88,28 @@ class InfrahubGeneratorDefinitionConfig(InfrahubRepositoryConfigElement):
8888
file_path: Path = Field(..., description="The file within the repository with the generator code.")
8989
query: str = Field(..., description="The GraphQL query to use as input.")
9090
parameters: dict[str, Any] = Field(
91-
default_factory=dict, description="The input parameters required to run this check"
91+
default_factory=dict,
92+
description="Maps GraphQL query variable names to target object attribute paths using double-underscore notation.",
93+
)
94+
targets: str = Field(
95+
...,
96+
description="Name of the CoreStandardGroup whose members become individual Generator targets. One run is created per group member.",
97+
)
98+
class_name: str = Field(
99+
default="Generator",
100+
description="The name of the Python class within file_path that extends InfrahubGenerator.",
92101
)
93-
targets: str = Field(..., description="The group to target when running this generator")
94-
class_name: str = Field(default="Generator", description="The name of the generator class to run.")
95102
convert_query_response: bool = Field(
96103
default=False,
97-
description="Decide if the generator should convert the result of the GraphQL query to SDK InfrahubNode objects.",
104+
description="When true, converts the raw GraphQL dict into SDK InfrahubNode objects accessible via self.nodes and self.store.",
98105
)
99106
execute_in_proposed_change: bool = Field(
100107
default=True,
101-
description="Decide if the generator should execute in a proposed change.",
108+
description="When true (default), the Generator runs as a CI check during proposed changes.",
102109
)
103110
execute_after_merge: bool = Field(
104111
default=True,
105-
description="Decide if the generator should execute after a merge.",
112+
description="When true (default), the Generator runs after a branch merge. Set to false for Generators that only run via event triggers.",
106113
)
107114

108115
def load_class(self, import_root: str | None = None, relative_path: str | None = None) -> type[InfrahubGenerator]:

uv.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)