From b8b97e3c09b7fa420b90ab0c04958cc2862f5529 Mon Sep 17 00:00:00 2001 From: shokollm <270575765+shokollm@users.noreply.github.com> Date: Sun, 5 Apr 2026 03:15:56 +0000 Subject: [PATCH] fix(worktree-lifecycle): address PR review feedback - Rename update-pr to set-pr for clarity (it's setting the PR URL, not updating PR) - Add optional pr-url argument to kugetsu start command Usage: kugetsu start [pr-url] - If pr-url is provided at start, it's stored directly in session file --- skills/kugetsu/scripts/kugetsu | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/skills/kugetsu/scripts/kugetsu b/skills/kugetsu/scripts/kugetsu index 8884872..ccb4c90 100755 --- a/skills/kugetsu/scripts/kugetsu +++ b/skills/kugetsu/scripts/kugetsu @@ -78,7 +78,7 @@ Usage: kugetsu destroy [-y] Delete session for issue kugetsu destroy --pm-agent [-y] Delete pm-agent session (not recommended) kugetsu destroy --base [-y] Delete base session - kugetsu update-pr Update PR URL for session (for PR tracking) + kugetsu set-pr Set PR URL for session (for PR tracking) kugetsu help Show this help Issue Ref Format: @@ -1499,6 +1499,7 @@ EOF cmd_start() { local issue_ref="" local message="" + local pr_url="" local args=("$@") args=$(set_debug_mode "${args[@]}") @@ -1508,11 +1509,14 @@ cmd_start() { issue_ref="$arg" elif [ -z "$message" ]; then message="$arg" + elif [ -z "$pr_url" ]; then + pr_url="$arg" fi done if [ -z "$issue_ref" ] || [ -z "$message" ]; then echo "Error: start requires and " >&2 + echo "Usage: kugetsu start [pr-url]" >&2 exit 1 fi @@ -1654,7 +1658,7 @@ session = { "created_at": "$(date -Iseconds)", "state": "idle", "branch_name": "$branch_name", - "pr_url": None + "pr_url": "$pr_url" if "$pr_url" else None } with open("$SESSIONS_DIR/$session_file", "w") as f: @@ -2021,12 +2025,12 @@ main() { destroy) cmd_destroy "$@" ;; - update-pr) + set-pr) local issue_ref="${1:-}" local pr_url="${2:-}" if [ -z "$issue_ref" ] || [ -z "$pr_url" ]; then - echo "Usage: kugetsu update-pr " >&2 - echo "Example: kugetsu update-pr github.com/shoko/kugetsu#14 https://git.fbrns.co/shoko/kugetsu/pulls/123" >&2 + echo "Usage: kugetsu set-pr " >&2 + echo "Example: kugetsu set-pr github.com/shoko/kugetsu#14 https://git.fbrns.co/shoko/kugetsu/pulls/123" >&2 exit 1 fi validate_issue_ref "$issue_ref"