claude-issue-solver 1.26.4 → 1.27.0

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.
Files changed (2) hide show
  1. package/dist/commands/go.js +40 -11
  2. package/package.json +1 -1
@@ -40,16 +40,34 @@ function getIssueWorktrees() {
40
40
  }
41
41
  function getPRForBranch(branch) {
42
42
  try {
43
- const output = (0, child_process_1.execSync)(`gh pr list --head "${branch}" --json url --jq '.[0].url'`, {
43
+ const output = (0, child_process_1.execSync)(`gh pr list --head "${branch}" --json url,reviewDecision --jq '.[0]'`, {
44
44
  encoding: 'utf-8',
45
45
  stdio: ['pipe', 'pipe', 'pipe'],
46
46
  }).trim();
47
- return output || null;
47
+ if (!output || output === 'null')
48
+ return null;
49
+ const data = JSON.parse(output);
50
+ return {
51
+ url: data.url,
52
+ reviewDecision: data.reviewDecision,
53
+ };
48
54
  }
49
55
  catch {
50
56
  return null;
51
57
  }
52
58
  }
59
+ function getReviewStatusLabel(reviewDecision) {
60
+ switch (reviewDecision) {
61
+ case 'APPROVED':
62
+ return chalk_1.default.green('✓ Approved');
63
+ case 'CHANGES_REQUESTED':
64
+ return chalk_1.default.red('✗ Changes requested');
65
+ case 'REVIEW_REQUIRED':
66
+ return chalk_1.default.yellow('○ Review required');
67
+ default:
68
+ return chalk_1.default.dim('○ No reviews');
69
+ }
70
+ }
53
71
  async function goCommand(issueNumber) {
54
72
  const worktrees = getIssueWorktrees();
55
73
  if (worktrees.length === 0) {
@@ -72,12 +90,22 @@ async function goCommand(issueNumber) {
72
90
  selectedWorktree = found;
73
91
  }
74
92
  else {
75
- // Show selection
93
+ // Show selection with PR status
76
94
  console.log(chalk_1.default.bold('\n📂 Issue worktrees:\n'));
77
- const choices = worktrees.map((wt) => ({
78
- name: `#${wt.issueNumber}\t${wt.branch}`,
79
- value: wt,
95
+ // Fetch PR info for all worktrees
96
+ const worktreesWithPR = worktrees.map((wt) => ({
97
+ ...wt,
98
+ prInfo: getPRForBranch(wt.branch),
80
99
  }));
100
+ const choices = worktreesWithPR.map((wt) => {
101
+ const statusTag = wt.prInfo
102
+ ? getReviewStatusLabel(wt.prInfo.reviewDecision)
103
+ : chalk_1.default.dim('No PR');
104
+ return {
105
+ name: `#${wt.issueNumber}\t${wt.branch}\t${statusTag}`,
106
+ value: wt,
107
+ };
108
+ });
81
109
  choices.push({
82
110
  name: chalk_1.default.dim('Cancel'),
83
111
  value: null,
@@ -98,13 +126,14 @@ async function goCommand(issueNumber) {
98
126
  selectedWorktree = selected;
99
127
  }
100
128
  // Get PR info
101
- const prUrl = getPRForBranch(selectedWorktree.branch);
129
+ const prInfo = getPRForBranch(selectedWorktree.branch);
102
130
  console.log();
103
131
  console.log(chalk_1.default.bold(`📂 Issue #${selectedWorktree.issueNumber}`));
104
132
  console.log(chalk_1.default.dim(` Path: ${selectedWorktree.path}`));
105
133
  console.log(chalk_1.default.dim(` Branch: ${selectedWorktree.branch}`));
106
- if (prUrl) {
107
- console.log(chalk_1.default.cyan(` PR: ${prUrl}`));
134
+ if (prInfo) {
135
+ console.log(chalk_1.default.cyan(` PR: ${prInfo.url}`));
136
+ console.log(` Status: ${getReviewStatusLabel(prInfo.reviewDecision)}`);
108
137
  }
109
138
  console.log();
110
139
  // Ask what to do
@@ -113,7 +142,7 @@ async function goCommand(issueNumber) {
113
142
  { name: '📂 Open in Finder', value: 'finder' },
114
143
  { name: '💻 Print cd command', value: 'cd' },
115
144
  ];
116
- if (prUrl) {
145
+ if (prInfo) {
117
146
  actions.unshift({ name: '🔗 Open PR in browser', value: 'pr' });
118
147
  }
119
148
  actions.push({ name: chalk_1.default.dim('Cancel'), value: 'cancel' });
@@ -128,7 +157,7 @@ async function goCommand(issueNumber) {
128
157
  switch (action) {
129
158
  case 'pr':
130
159
  console.log(chalk_1.default.dim(`\nOpening PR in browser...`));
131
- (0, child_process_1.execSync)(`open "${prUrl}"`, { stdio: 'pipe' });
160
+ (0, child_process_1.execSync)(`open "${prInfo.url}"`, { stdio: 'pipe' });
132
161
  break;
133
162
  case 'vscode':
134
163
  console.log(chalk_1.default.dim(`\nOpening in VS Code...`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-issue-solver",
3
- "version": "1.26.4",
3
+ "version": "1.27.0",
4
4
  "description": "Automatically solve GitHub issues using Claude Code",
5
5
  "main": "dist/index.js",
6
6
  "bin": {