opencode-pilot 0.21.1 → 0.21.3

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.
@@ -48,7 +48,6 @@ jobs:
48
48
  - uses: actions/checkout@v4
49
49
  with:
50
50
  fetch-depth: 0
51
- persist-credentials: false
52
51
 
53
52
  - name: Setup Node.js
54
53
  uses: actions/setup-node@v4
package/AGENTS.md CHANGED
@@ -36,12 +36,10 @@ gh release list -R athal7/opencode-pilot -L 1
36
36
  npm view opencode-pilot version
37
37
  ```
38
38
 
39
- ### 3. Clear OpenCode Plugin Cache
40
-
41
- OpenCode caches plugins at `~/.cache/opencode/node_modules/`. Clear the cache to pick up the new version:
39
+ ### 3. Upgrade via Homebrew
42
40
 
43
41
  ```bash
44
- rm -rf ~/.cache/opencode/node_modules/opencode-pilot
42
+ brew upgrade opencode-pilot
45
43
  ```
46
44
 
47
45
  ### 4. Restart Service
@@ -50,13 +48,13 @@ If the service is running, restart it:
50
48
 
51
49
  ```bash
52
50
  # Stop current service (Ctrl+C) and restart
53
- npx opencode-pilot start
51
+ opencode-pilot start
54
52
  ```
55
53
 
56
54
  ### 5. Verify Upgrade
57
55
 
58
56
  ```bash
59
- npx opencode-pilot status
57
+ opencode-pilot status
60
58
  ```
61
59
 
62
60
  ## Configuration
@@ -1,8 +1,8 @@
1
1
  class OpencodePilot < Formula
2
2
  desc "Automation daemon for OpenCode - polls GitHub/Linear issues and spawns sessions"
3
3
  homepage "https://github.com/athal7/opencode-pilot"
4
- url "https://github.com/athal7/opencode-pilot/archive/refs/tags/v0.20.5.tar.gz"
5
- sha256 "454bdead3efab2278c1b25e31d8e3d9dcb0c1895f4723a8e7757e01812605a84"
4
+ url "https://github.com/athal7/opencode-pilot/archive/refs/tags/v0.21.2.tar.gz"
5
+ sha256 "7295684359ee266599b634d903944a10d3597659266303f03c8376944e8e2a36"
6
6
  license "MIT"
7
7
 
8
8
  depends_on "node"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-pilot",
3
- "version": "0.21.1",
3
+ "version": "0.21.3",
4
4
  "type": "module",
5
5
  "main": "plugin/index.js",
6
6
  "description": "Automation daemon for OpenCode - polls for work and spawns sessions",
package/service/poller.js CHANGED
@@ -558,15 +558,12 @@ export async function enrichItemsWithComments(items, source, options = {}) {
558
558
  }
559
559
 
560
560
  // Fetch comments for each item (could be parallelized with Promise.all for speed)
561
+ // Note: Always fetch reviews - commentsCount from gh search only counts issue comments,
562
+ // not PR reviews or PR review comments. PRs with only review feedback would be missed.
561
563
  const enrichedItems = [];
562
564
  for (const item of items) {
563
- // Only fetch if item has comments
564
- if (item.comments > 0) {
565
- const comments = await fetchGitHubComments(item, options);
566
- enrichedItems.push({ ...item, _comments: comments });
567
- } else {
568
- enrichedItems.push(item);
569
- }
565
+ const comments = await fetchGitHubComments(item, options);
566
+ enrichedItems.push({ ...item, _comments: comments });
570
567
  }
571
568
 
572
569
  return enrichedItems;
@@ -1113,7 +1113,10 @@ describe('poller.js', () => {
1113
1113
  assert.strictEqual(result[0]._comments, undefined);
1114
1114
  });
1115
1115
 
1116
- test('skips items with zero comments', async () => {
1116
+ test('enriches items with zero commentsCount (PR reviews not counted in commentsCount)', async () => {
1117
+ // This test verifies the fix for a bug where PRs with review feedback but
1118
+ // zero issue comments were not enriched. GitHub's commentsCount only counts
1119
+ // issue comments, not PR reviews or PR review comments.
1117
1120
  const { enrichItemsWithComments } = await import('../../service/poller.js');
1118
1121
 
1119
1122
  const items = [
@@ -1127,10 +1130,13 @@ describe('poller.js', () => {
1127
1130
 
1128
1131
  const result = await enrichItemsWithComments(items, source);
1129
1132
 
1130
- // Items returned unchanged (no API calls made)
1133
+ // Items should be enriched with _comments (empty array if no feedback found)
1134
+ // The actual API call may fail in test environment, but items should still
1135
+ // have _comments set (either to fetched comments or empty array on error)
1131
1136
  assert.strictEqual(result.length, 2);
1132
- assert.strictEqual(result[0]._comments, undefined);
1133
- assert.strictEqual(result[1]._comments, undefined);
1137
+ // _comments should be defined (array) - we always try to fetch now
1138
+ assert.ok(Array.isArray(result[0]._comments), 'First item should have _comments array');
1139
+ assert.ok(Array.isArray(result[1]._comments), 'Second item should have _comments array');
1134
1140
  });
1135
1141
 
1136
1142
  test('identifies GitHub MCP source correctly', async () => {
@@ -1142,9 +1148,10 @@ describe('poller.js', () => {
1142
1148
  tool: { mcp: 'github', name: 'search_issues' }
1143
1149
  };
1144
1150
 
1145
- // Should not throw, just skip due to 0 comments
1151
+ // Should try to fetch comments (may return empty array on API error in tests)
1146
1152
  const result = await enrichItemsWithComments(items, source);
1147
1153
  assert.strictEqual(result.length, 1);
1154
+ assert.ok(Array.isArray(result[0]._comments), 'Should have _comments array');
1148
1155
  });
1149
1156
 
1150
1157
  test('identifies GitHub CLI source correctly', async () => {
@@ -1156,9 +1163,10 @@ describe('poller.js', () => {
1156
1163
  tool: { command: ['gh', 'search', 'issues', '--json', 'number'] }
1157
1164
  };
1158
1165
 
1159
- // Should not throw, just skip due to 0 comments
1166
+ // Should try to fetch comments (may return empty array on API error in tests)
1160
1167
  const result = await enrichItemsWithComments(items, source);
1161
1168
  assert.strictEqual(result.length, 1);
1169
+ assert.ok(Array.isArray(result[0]._comments), 'Should have _comments array');
1162
1170
  });
1163
1171
  });
1164
1172