decomposer: fix validation failure for Migrate the kab_ingestion domain models, ports, GitHub SCM connector, and SharePoint CMS connector into the repository's app/ package.; Wire the migrated ingestion components into the agent application entry point, card, settings, triggers, governance, publication, and validation layers.; Populate every remaining placeholder file with working application, package, test, dependency, and Kubernetes content.; Verify the migrated agent and completed repository end to end.
Some checks failed
quality-gates / verify (push) Failing after 7s
Some checks failed
quality-gates / verify (push) Failing after 7s
This commit is contained in:
@@ -1,15 +1,20 @@
|
||||
from dataclasses import dataclass
|
||||
import os
|
||||
from functools import lru_cache
|
||||
from pydantic import Field
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class Settings:
|
||||
github_token: str = ""
|
||||
sharepoint_site_url: str = "https://sharepoint.invalid"
|
||||
allowed_repositories: tuple[str, ...] = ()
|
||||
require_approval: bool = True
|
||||
environment: str = "development"
|
||||
|
||||
@classmethod
|
||||
def from_env(cls) -> "Settings":
|
||||
repos = tuple(x.strip() for x in os.getenv("ALLOWED_REPOSITORIES", "").split(",") if x.strip())
|
||||
return cls(os.getenv("GITHUB_TOKEN", ""), os.getenv("SHAREPOINT_SITE_URL", cls.sharepoint_site_url), repos, os.getenv("REQUIRE_APPROVAL", "true").lower() != "false", os.getenv("ENVIRONMENT", "development"))
|
||||
class Settings(BaseSettings):
|
||||
model_config = SettingsConfigDict(env_prefix="INGESTION_", case_sensitive=False)
|
||||
github_token: str | None = Field(default=None, repr=False)
|
||||
github_api_base: str = "https://api.github.com"
|
||||
sharepoint_site_url: str | None = None
|
||||
sharepoint_access_token: str | None = Field(default=None, repr=False)
|
||||
require_governance_approval: bool = True
|
||||
publish_enabled: bool = False
|
||||
allowed_sources: tuple[str, ...] = ("github",)
|
||||
service_name: str = "content-ingestion-agent"
|
||||
|
||||
|
||||
@lru_cache
|
||||
def get_settings() -> Settings:
|
||||
return Settings()
|
||||
|
||||
Reference in New Issue
Block a user