|
|
@@ -144,7 +144,9 @@ Copy from `commands.json.example` and configure commands for each event type.
|
|
|
"args": ["arg1", "{{variable}}", "arg3"],
|
|
|
"cwd": "/working/directory" | null,
|
|
|
"timeout": 300000,
|
|
|
- "filterBranch": "branch-name" | null
|
|
|
+ "filterBranch": "branch-name" | null,
|
|
|
+ "filterActions": ["action1", "action2"] | null,
|
|
|
+ "filterAssignee": "username" | null
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
@@ -164,6 +166,8 @@ Copy from `commands.json.example` and configure commands for each event type.
|
|
|
- `cwd` - Working directory (null = project root)
|
|
|
- `timeout` - Timeout in milliseconds
|
|
|
- `filterBranch` - Only execute for specific branch (null = all branches)
|
|
|
+- `filterActions` - Only execute for specific actions (array, optional). Examples: `["assigned", "opened"]`, `["synchronize"]`. If omitted or empty, execute for all actions
|
|
|
+- `filterAssignee` - Only execute when issue/PR is assigned to specific user (string, optional). If omitted, execute regardless of assignee
|
|
|
|
|
|
## Important Patterns
|
|
|
|
|
|
@@ -174,7 +178,10 @@ Copy from `commands.json.example` and configure commands for each event type.
|
|
|
5. **Configuration Files**: `.env` for enable/disable flags, `commands.json` for command definitions
|
|
|
6. **Backward Compatibility**: Legacy .env command format still supported (deprecated)
|
|
|
7. **Error Handling**: Try-catch blocks with logging; errors don't stop server
|
|
|
-8. **Branch Filtering**: Optional per-command branch filtering via `filterBranch` field
|
|
|
+8. **Command Filtering**: Optional per-command filtering via:
|
|
|
+ - `filterBranch` - Execute only for specific branches
|
|
|
+ - `filterActions` - Execute only for specific actions (e.g., `["assigned", "opened"]`)
|
|
|
+ - `filterAssignee` - Execute only when assigned to specific user (e.g., `"claude"`)
|
|
|
9. **Multiple Commands**: Each event type can have multiple commands that execute sequentially
|
|
|
10. **Shell & Node Execution**: Commands can be shell scripts or Node.js scripts
|
|
|
|