addressing coderabbit PR comment

This commit is contained in:
Adamsmith6300 2025-04-13 21:33:10 -07:00
parent a26fac435b
commit 396c070b28

View file

@ -59,14 +59,14 @@ class SearchSourceConnectorBase(BaseModel):
raise ValueError("NOTION_INTEGRATION_TOKEN cannot be empty")
elif connector_type == SearchSourceConnectorType.GITHUB_CONNECTOR:
# For GITHUB_CONNECTOR, only allow GITHUB_TOKEN
# For GITHUB_CONNECTOR, only allow GITHUB_PAT
allowed_keys = ["GITHUB_PAT"]
if set(config.keys()) != set(allowed_keys):
raise ValueError(f"For GITHUB_CONNECTOR connector type, config must only contain these keys: {allowed_keys}")
# Ensure the token is not empty
if not config.get("GITHUB_PAT"):
raise ValueError("GITHUB_TOKEN cannot be empty")
raise ValueError("GITHUB_PAT cannot be empty")
return config