claude-issue-solver 1.27.0 → 1.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/clean.js +6 -5
- package/dist/commands/merge.js +8 -7
- package/package.json +1 -1
package/dist/commands/clean.js
CHANGED
|
@@ -48,12 +48,13 @@ const os = __importStar(require("os"));
|
|
|
48
48
|
const child_process_1 = require("child_process");
|
|
49
49
|
const github_1 = require("../utils/github");
|
|
50
50
|
const git_1 = require("../utils/git");
|
|
51
|
-
function closeWindowsWithPath(folderPath, issueNumber) {
|
|
51
|
+
function closeWindowsWithPath(folderPath, issueNumber, prNumber) {
|
|
52
52
|
if (os.platform() !== 'darwin')
|
|
53
53
|
return;
|
|
54
54
|
const folderName = path.basename(folderPath);
|
|
55
55
|
const issuePattern = `Issue #${issueNumber}`;
|
|
56
|
-
|
|
56
|
+
const reviewPattern = prNumber ? `Review PR #${prNumber}` : `issue-${issueNumber}-`;
|
|
57
|
+
// Try to close iTerm2 tabs/windows with this path, issue number, or review PR
|
|
57
58
|
try {
|
|
58
59
|
(0, child_process_1.execSync)(`osascript -e '
|
|
59
60
|
tell application "iTerm"
|
|
@@ -61,7 +62,7 @@ function closeWindowsWithPath(folderPath, issueNumber) {
|
|
|
61
62
|
repeat with t in tabs of w
|
|
62
63
|
repeat with s in sessions of t
|
|
63
64
|
set sessionName to name of s
|
|
64
|
-
if sessionName contains "${folderName}" or sessionName contains "${issuePattern}" then
|
|
65
|
+
if sessionName contains "${folderName}" or sessionName contains "${issuePattern}" or sessionName contains "${reviewPattern}" then
|
|
65
66
|
close s
|
|
66
67
|
end if
|
|
67
68
|
end repeat
|
|
@@ -73,13 +74,13 @@ function closeWindowsWithPath(folderPath, issueNumber) {
|
|
|
73
74
|
catch {
|
|
74
75
|
// iTerm not running or no matching sessions
|
|
75
76
|
}
|
|
76
|
-
// Try to close Terminal.app windows with this path or
|
|
77
|
+
// Try to close Terminal.app windows with this path, issue number, or review PR
|
|
77
78
|
try {
|
|
78
79
|
(0, child_process_1.execSync)(`osascript -e '
|
|
79
80
|
tell application "Terminal"
|
|
80
81
|
repeat with w in windows
|
|
81
82
|
set windowName to name of w
|
|
82
|
-
if windowName contains "${folderName}" or windowName contains "${issuePattern}" then
|
|
83
|
+
if windowName contains "${folderName}" or windowName contains "${issuePattern}" or windowName contains "${reviewPattern}" then
|
|
83
84
|
close w
|
|
84
85
|
end if
|
|
85
86
|
end repeat
|
package/dist/commands/merge.js
CHANGED
|
@@ -45,11 +45,12 @@ const path = __importStar(require("path"));
|
|
|
45
45
|
const os = __importStar(require("os"));
|
|
46
46
|
const child_process_1 = require("child_process");
|
|
47
47
|
const git_1 = require("../utils/git");
|
|
48
|
-
function closeWindowsWithPath(folderPath, issueNumber) {
|
|
48
|
+
function closeWindowsWithPath(folderPath, issueNumber, prNumber) {
|
|
49
49
|
if (os.platform() !== 'darwin')
|
|
50
50
|
return;
|
|
51
51
|
const folderName = path.basename(folderPath);
|
|
52
52
|
const issuePattern = `Issue #${issueNumber}`;
|
|
53
|
+
const reviewPattern = prNumber ? `Review PR #${prNumber}` : `issue-${issueNumber}-`;
|
|
53
54
|
// Try to close iTerm2 tabs/windows
|
|
54
55
|
try {
|
|
55
56
|
(0, child_process_1.execSync)(`osascript -e '
|
|
@@ -58,7 +59,7 @@ function closeWindowsWithPath(folderPath, issueNumber) {
|
|
|
58
59
|
repeat with t in tabs of w
|
|
59
60
|
repeat with s in sessions of t
|
|
60
61
|
set sessionName to name of s
|
|
61
|
-
if sessionName contains "${folderName}" or sessionName contains "${issuePattern}" then
|
|
62
|
+
if sessionName contains "${folderName}" or sessionName contains "${issuePattern}" or sessionName contains "${reviewPattern}" then
|
|
62
63
|
close s
|
|
63
64
|
end if
|
|
64
65
|
end repeat
|
|
@@ -76,7 +77,7 @@ function closeWindowsWithPath(folderPath, issueNumber) {
|
|
|
76
77
|
tell application "Terminal"
|
|
77
78
|
repeat with w in windows
|
|
78
79
|
set windowName to name of w
|
|
79
|
-
if windowName contains "${folderName}" or windowName contains "${issuePattern}" then
|
|
80
|
+
if windowName contains "${folderName}" or windowName contains "${issuePattern}" or windowName contains "${reviewPattern}" then
|
|
80
81
|
close w
|
|
81
82
|
end if
|
|
82
83
|
end repeat
|
|
@@ -131,14 +132,14 @@ function getOpenPRs(projectRoot) {
|
|
|
131
132
|
return [];
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
|
-
function cleanupWorktree(projectRoot, branchName, issueNumber) {
|
|
135
|
+
function cleanupWorktree(projectRoot, branchName, issueNumber, prNumber) {
|
|
135
136
|
const projectName = (0, git_1.getProjectName)();
|
|
136
137
|
const parentDir = path.dirname(projectRoot);
|
|
137
138
|
const worktreePath = path.join(parentDir, `${projectName}-${branchName}`);
|
|
138
|
-
// Close windows
|
|
139
|
+
// Close windows (including review terminals)
|
|
139
140
|
if (issueNumber) {
|
|
140
141
|
try {
|
|
141
|
-
closeWindowsWithPath(worktreePath, issueNumber);
|
|
142
|
+
closeWindowsWithPath(worktreePath, issueNumber, prNumber);
|
|
142
143
|
}
|
|
143
144
|
catch {
|
|
144
145
|
// Ignore
|
|
@@ -250,7 +251,7 @@ async function mergeCommand() {
|
|
|
250
251
|
try {
|
|
251
252
|
// Clean up worktree FIRST (before merge) to avoid branch deletion issues
|
|
252
253
|
try {
|
|
253
|
-
cleanupWorktree(projectRoot, pr.headRefName, pr.issueNumber?.toString() || null);
|
|
254
|
+
cleanupWorktree(projectRoot, pr.headRefName, pr.issueNumber?.toString() || null, pr.number.toString());
|
|
254
255
|
}
|
|
255
256
|
catch {
|
|
256
257
|
// Worktree may not exist, continue with merge
|