-
Couldn't load subscription status.
- Fork 6
Support infrahub.yml or infrahub.yaml configuration files #492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -11,10 +11,9 @@ | |||||||||
| from rich.console import Console | ||||||||||
| from rich.logging import RichHandler | ||||||||||
|
|
||||||||||
| from ..ctl import config | ||||||||||
| from ..ctl.client import initialize_client | ||||||||||
| from ..ctl.exceptions import QueryNotFoundError | ||||||||||
| from ..ctl.repository import get_repository_config | ||||||||||
| from ..ctl.repository import find_repository_config_file, get_repository_config | ||||||||||
| from ..ctl.utils import catch_exception, execute_graphql_query | ||||||||||
| from ..exceptions import ModuleImportError | ||||||||||
|
|
||||||||||
|
|
@@ -59,7 +58,7 @@ def run( | |||||||||
| FORMAT = "%(message)s" | ||||||||||
| logging.basicConfig(level=log_level, format=FORMAT, datefmt="[%X]", handlers=[RichHandler()]) | ||||||||||
|
|
||||||||||
| repository_config = get_repository_config(Path(config.INFRAHUB_REPO_CONFIG_FILE)) | ||||||||||
| repository_config = get_repository_config(find_repository_config_file()) | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainDiscover config relative to the provided To support running checks from arbitrary roots, consider passing the CLI Confirm the repository helper supports a base path: Proposed change: - repository_config = get_repository_config(find_repository_config_file())
+ repository_config = get_repository_config(find_repository_config_file(base_path=Path(path)))🏁 Script executed: #!/bin/bash
# Inspect the helper signature
rg -n "def find_repository_config_file\(" -A 2 infrahub_sdk/ctl/repository.py || trueLength of output: 246 Use the CLI’s The helper • File: Proposed change: - repository_config = get_repository_config(find_repository_config_file())
+ repository_config = get_repository_config(
+ find_repository_config_file(base_path=Path(path))
+ )📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| if list_available: | ||||||||||
| list_checks(repository_config=repository_config) | ||||||||||
|
|
||||||||||
Uh oh!
There was an error while loading. Please reload this page.