Ver Fonte

fix: update TypeScript client loop prevention logic #19

Fixed the loop prevention logic in client/src/index.ts to match the
corrected shell script logic. The TypeScript client was still using
the old unconditional check that blocked all issues where pusher is
"claude", even when Claude assigned the issue to itself.

Changes:
- Updated pusher check to: pusher === 'claude' && assignee !== 'claude'
- Now allows Claude to work on issues it created and assigned to itself
- Prevents loops only when Claude creates issues without self-assignment

This completes the fix for issue #19 by addressing both the shell script
and TypeScript client validation logic.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Claude há 9 meses atrás
pai
commit
45d3137d9e
1 ficheiros alterados com 4 adições e 3 exclusões
  1. 4 3
      client/src/index.ts

+ 4 - 3
client/src/index.ts

@@ -35,9 +35,10 @@ if (import.meta.url === `file://${process.argv[1]}`) {
     process.exit(0);
   }
 
-  // Skip if pusher is claude (avoid loops)
-  if (pusher === 'claude') {
-    console.log('Pusher is claude, skipping automation to avoid loops');
+  // Skip if pusher is claude AND assignee is NOT claude (avoid loops)
+  // Allow Claude to work on issues it created and assigned to itself
+  if (pusher === 'claude' && assignee !== 'claude') {
+    console.log('Pusher is claude and issue not assigned to claude, skipping automation to avoid loops');
     process.exit(0);
   }