feat: add agent skills to review PR (#320)

This commit is contained in:
Abhishek 2026-05-19 17:02:26 +05:30 committed by GitHub
parent 8778bb453e
commit 151bf77e40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 331 additions and 29 deletions

View file

@ -129,22 +129,6 @@ async def get_user(
return user_model
async def get_user_optional(
authorization: Annotated[str | None, Header()] = None,
x_api_key: Annotated[str | None, Header(alias="X-API-Key")] = None,
) -> UserModel | None:
"""
Same as get_user but returns None instead of raising 401 if unauthorized.
Useful for endpoints that need to work both with and without auth.
"""
try:
return await get_user(authorization, x_api_key)
except HTTPException as e:
if e.status_code == 401:
return None
raise
async def _handle_oss_auth(authorization: str | None) -> UserModel:
"""
Handle authentication for OSS deployment mode.

View file

@ -154,7 +154,7 @@ class NangoService:
# Create the integration in the database
integration = await db_client.create_integration(
integration_id=integration_id,
organisation_id=organization_id,
organization_id=organization_id,
provider=webhook_data.provider,
created_by=user_id,
is_active=True,