fix(security): add rstrip('/') to get_target_repo for trailing-slash URLs

The regex r'[:/]([^/]+/[^/]+?)(?:\.git)?$' fails on URLs with trailing slashes
like 'https://git.softuniq.eu/UniqueSoft/APAW/' because the final '/' breaks
the pattern. Added .rstrip('/') in Python and sed 's:/*' in Bash to all
get_target_repo() implementations across 11 files.
This commit is contained in:
¨NW¨
2026-04-19 12:17:53 +01:00
parent 7523911812
commit 573d9a641e
11 changed files with 16 additions and 16 deletions

View File

@@ -173,7 +173,7 @@ bun run agent:stats --project UniqueSoft/my-shop
```bash
# Автоопределение проекта из git remote
TARGET_REPO=$(git remote get-url origin | sed -E 's|.*[:/]([^/]+/[^/]+?)(\.git)?$|\1|')
TARGET_REPO=$(git remote get-url origin | sed 's:/*$::' | sed -E 's|.*[:/]([^/]+/[^/]+?)(\.git)?$|\1|')
```
### Атомарные задачи (1 действие = 1 задача)