mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-05 03:59:06 +00:00
addressing coderabbit PR comment
This commit is contained in:
parent
a26fac435b
commit
396c070b28
1 changed files with 2 additions and 2 deletions
|
@ -59,14 +59,14 @@ class SearchSourceConnectorBase(BaseModel):
|
||||||
raise ValueError("NOTION_INTEGRATION_TOKEN cannot be empty")
|
raise ValueError("NOTION_INTEGRATION_TOKEN cannot be empty")
|
||||||
|
|
||||||
elif connector_type == SearchSourceConnectorType.GITHUB_CONNECTOR:
|
elif connector_type == SearchSourceConnectorType.GITHUB_CONNECTOR:
|
||||||
# For GITHUB_CONNECTOR, only allow GITHUB_TOKEN
|
# For GITHUB_CONNECTOR, only allow GITHUB_PAT
|
||||||
allowed_keys = ["GITHUB_PAT"]
|
allowed_keys = ["GITHUB_PAT"]
|
||||||
if set(config.keys()) != set(allowed_keys):
|
if set(config.keys()) != set(allowed_keys):
|
||||||
raise ValueError(f"For GITHUB_CONNECTOR connector type, config must only contain these keys: {allowed_keys}")
|
raise ValueError(f"For GITHUB_CONNECTOR connector type, config must only contain these keys: {allowed_keys}")
|
||||||
|
|
||||||
# Ensure the token is not empty
|
# Ensure the token is not empty
|
||||||
if not config.get("GITHUB_PAT"):
|
if not config.get("GITHUB_PAT"):
|
||||||
raise ValueError("GITHUB_TOKEN cannot be empty")
|
raise ValueError("GITHUB_PAT cannot be empty")
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue