Skip to content

Commit

Permalink
checking possible issue
Browse files Browse the repository at this point in the history
  • Loading branch information
yairsimantov20 committed Oct 17, 2023
1 parent 736a4ad commit fcfbc51
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions integrations/sonarqube/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ async def send_paginated_api_request(
params=query_params,
json=json_data,
headers=self.api_auth_header,
auth=(self.api_key, ""),
)
response.raise_for_status()
response_json = response.json()
Expand Down Expand Up @@ -117,12 +118,16 @@ async def get_components(self) -> list[Any]:
if self.organization_id:
params["organization"] = self.organization_id
logger.info(f"Fetching all components in organization: {self.organization_id}")
response = await self.send_paginated_api_request(
endpoint=Endpoints.PROJECTS,
data_key="components",
query_params=params,
)
return response
try:
response = await self.send_paginated_api_request(
endpoint=Endpoints.PROJECTS,
data_key="components",
query_params=params,
)
return response
except Exception as e:
logger.error(f"Error occurred while fetching components: {e}")
raise

async def get_single_component(self, project: dict[str, Any]) -> dict[str, Any]:
"""
Expand Down
2 changes: 1 addition & 1 deletion integrations/sonarqube/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "sonarqube"
version = "0.1.5-dev02"
version = "0.1.5-dev03 "
description = "SonarQube projects and code quality analysis integration"
authors = ["Port Team <[email protected]>"]

Expand Down

0 comments on commit fcfbc51

Please sign in to comment.