- Replace inline toJSON() with environment variables
- Use Python to parse JSON and dispatch events properly
- Avoid bash syntax errors with parentheses in JSON
- Maintain same functionality for PR vs issue comment handling
Fixes: /var/run/act/workflow/4: line 25: syntax error near unexpected token