Skip to content

Commit b02ba60

Browse files
committed
fix: ruff format license_service and add license to IRepository DAL IN-1105
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
1 parent fb138fc commit b02ba60

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

services/apps/git_integration/src/crowdgit/services/license/license_service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ async def detect(self, repo_path: str) -> str | None:
3030
licenses = data.get("licenses") or []
3131
matched_files = data.get("matched_files") or []
3232
spdx_id = licenses[0].get("spdx_id") if licenses else None
33-
confidence = (matched_files[0].get("matcher") or {}).get("confidence") if matched_files else None
33+
confidence = (
34+
(matched_files[0].get("matcher") or {}).get("confidence") if matched_files else None
35+
)
3436
if spdx_id:
3537
self.logger.info(f"License detected: {spdx_id} (confidence={confidence}) in {repo_path}")
3638
else:

services/libs/data-access-layer/src/repositories/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export interface IRepository {
2121
updatedAt: string
2222
deletedAt: string | null
2323
lastArchivedCheckAt: string | null
24+
license: string | null
2425
}
2526

2627
export interface ICreateRepository {

0 commit comments

Comments
 (0)