Skip to content

Commit cee0e7f

Browse files
authored
Merge pull request #917 from opsmill/develop
Merge develop into infrahub-develop
2 parents aa01aa6 + 2bfc100 commit cee0e7f

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
@@ -87,21 +87,28 @@ class InfrahubGeneratorDefinitionConfig(InfrahubRepositoryConfigElement):
8787
file_path: Path = Field(..., description="The file within the repository with the generator code.")
8888
query: str = Field(..., description="The GraphQL query to use as input.")
8989
parameters: dict[str, Any] = Field(
90-
default_factory=dict, description="The input parameters required to run this check"
90+
default_factory=dict,
91+
description="Maps GraphQL query variable names to target object attribute paths using double-underscore notation.",
92+
)
93+
targets: str = Field(
94+
...,
95+
description="Name of the CoreStandardGroup whose members become individual Generator targets. One run is created per group member.",
96+
)
97+
class_name: str = Field(
98+
default="Generator",
99+
description="The name of the Python class within file_path that extends InfrahubGenerator.",
91100
)
92-
targets: str = Field(..., description="The group to target when running this generator")
93-
class_name: str = Field(default="Generator", description="The name of the generator class to run.")
94101
convert_query_response: bool = Field(
95102
default=False,
96-
description="Decide if the generator should convert the result of the GraphQL query to SDK InfrahubNode objects.",
103+
description="When true, converts the raw GraphQL dict into SDK InfrahubNode objects accessible via self.nodes and self.store.",
97104
)
98105
execute_in_proposed_change: bool = Field(
99106
default=True,
100-
description="Decide if the generator should execute in a proposed change.",
107+
description="When true (default), the Generator runs as a CI check during proposed changes.",
101108
)
102109
execute_after_merge: bool = Field(
103110
default=True,
104-
description="Decide if the generator should execute after a merge.",
111+
description="When true (default), the Generator runs after a branch merge. Set to false for Generators that only run via event triggers.",
105112
)
106113

107114
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)