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:
@@ -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 задача)
|
||||
|
||||
Reference in New Issue
Block a user