Compare commits

..

5 Commits

Author SHA1 Message Date
shokollm
2051266809 fix: remove doubled .kugetsu-worktrees path segment in issue_ref_to_worktree_path
Fixes #179 - cmd_start fails due to incorrect worktree path being created
with .kugetsu-worktrees/.kugetsu-worktrees/ instead of just the worktree name.
2026-04-06 03:23:23 +00:00
80a3228be9 Merge pull request 'fix(kugetsu-session): extract_issue_ref_from_message fix URL parsing' (#178) from fix/issue-176-extract-issue-ref into main 2026-04-06 04:54:11 +02:00
shokollm
d68a63af41 fix(kugetsu-session): extract_issue_ref_from_message fix URL parsing
Fix issue where full URLs like #158
were incorrectly parsed to 'shoko/kugetsu/issues#158' instead of
'git.fbrns.co/shoko/kugetsu#158'.

The regex now correctly extracts instance, owner, repo, and number
using bash regex capture groups instead of fragile sed/cut pipeline.
2026-04-06 02:51:51 +00:00
56310755b8 Merge pull request 'fix: queue daemon crashes on every task (issue #174)' (#175) from fix/issue-174-queue-daemon-crashes into main 2026-04-06 04:16:12 +02:00
1b19c9a92c Merge pull request 'fix: init script captures wrong session IDs when old sessions exist' (#173) from fix/issue-172-init-script-wrong-session-ids into main 2026-04-06 03:09:30 +02:00
2 changed files with 6 additions and 8 deletions

View File

@@ -156,13 +156,11 @@ extract_issue_ref_from_message() {
return return
fi fi
if [[ "$message" =~ (https?://[a-zA-Z0-9.-]+/[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+/(issues|pull)/[0-9]+) ]]; then if [[ "$message" =~ (https?://)?([a-zA-Z0-9.-]+)/([a-zA-Z0-9._-]+)/([a-zA-Z0-9._-]+)/(issues|pull)/([0-9]+) ]]; then
local url="${BASH_REMATCH[1]}" local instance="${BASH_REMATCH[2]}"
local path=$(echo "$url" | sed 's|https\?://||' | cut -d'/' -f2-) local owner="${BASH_REMATCH[3]}"
local instance=$(echo "$path" | cut -d'/' -f1) local repo="${BASH_REMATCH[4]}"
local owner=$(echo "$path" | cut -d'/' -f2) local num="${BASH_REMATCH[6]}"
local repo=$(echo "$path" | cut -d'/' -f3)
local num=$(echo "$path" | grep -oE '[0-9]+$')
echo "${instance}/${owner}/${repo}#${num}" echo "${instance}/${owner}/${repo}#${num}"
return return
fi fi

View File

@@ -10,7 +10,7 @@ issue_ref_to_worktree_path() {
local issue_ref="$1" local issue_ref="$1"
local parent_dir="${2:-$WORKTREES_DIR}" local parent_dir="${2:-$WORKTREES_DIR}"
local worktree_name=$(issue_ref_to_worktree_name "$issue_ref") local worktree_name=$(issue_ref_to_worktree_name "$issue_ref")
echo "$parent_dir/.kugetsu-worktrees/$worktree_name" echo "$parent_dir/$worktree_name"
} }
issue_ref_to_branch_name() { issue_ref_to_branch_name() {