-
Notifications
You must be signed in to change notification settings - Fork 7
modify github assign/review to use slash_command events #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10,12 +10,12 @@ project: | |||||
| triggers: | ||||||
| - name: assign_issue_comment | ||||||
| connection: github | ||||||
| event_type: issue_comment | ||||||
| event_type: slash_command | ||||||
| call: handlers.py:on_assign_issue_comment | ||||||
| filter: "data.comment.body.startsWith('/assign') && (data.action in ['created', 'edited'])" | ||||||
| filter: "data.actual_event_type == 'issue_comment' && data.actual_data.action == 'created' && data.command.name == 'assign'" | ||||||
|
|
||||||
| - name: unassign_issue_comment | ||||||
| connection: github | ||||||
| event_type: issue_comment | ||||||
| event_type: slash_command | ||||||
| call: handlers.py:on_unassign_issue_comment | ||||||
| filter: "data.comment.body.startsWith('/unassign') && (data.action in ['created', 'edited'])" | ||||||
| filter: "data.actual_event_type == 'issue_comment' && data.actual_data.action == 'created' && data.command.name == 'unassign'" | ||||||
|
||||||
| filter: "data.actual_event_type == 'issue_comment' && data.actual_data.action == 'created' && data.command.name == 'unassign'" | |
| filter: "data.actual_event_type == 'issue_comment' && data.actual_data.action in ['created', 'edited'] && data.command.name == 'unassign'" |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10,12 +10,12 @@ project: | |||||
| triggers: | ||||||
| - name: review_issue_comment | ||||||
| connection: github | ||||||
| event_type: issue_comment | ||||||
| event_type: slash_command | ||||||
| call: handlers.py:on_review_issue_comment | ||||||
| filter: "data.comment.body.startsWith('/review') && (data.action in ['created', 'edited'])" | ||||||
| filter: "data.actual_event_type == 'issue_comment' && data.actual_data.action == 'created' && data.command.name == 'review'" | ||||||
|
||||||
| filter: "data.actual_event_type == 'issue_comment' && data.actual_data.action == 'created' && data.command.name == 'review'" | |
| filter: "data.actual_event_type == 'issue_comment' && data.actual_data.action in ['created', 'edited'] && data.command.name == 'review'" |
Copilot
AI
Dec 9, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filter no longer includes the 'edited' action that was supported in the original implementation. The old filter checked data.action in ['created', 'edited'], but the new filter only checks for data.actual_data.action == 'created'. This means slash commands in edited comments will no longer trigger the handler. If this behavior change is intentional, it should be documented; otherwise, the filter should be updated to: data.actual_event_type == 'issue_comment' && data.actual_data.action in ['created', 'edited'] && data.command.name == 'unreview'
| filter: "data.actual_event_type == 'issue_comment' && data.actual_data.action == 'created' && data.command.name == 'unreview'" | |
| filter: "data.actual_event_type == 'issue_comment' && data.actual_data.action in ['created', 'edited'] && data.command.name == 'unreview'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filter no longer includes the 'edited' action that was supported in the original implementation. The old filter checked
data.action in ['created', 'edited'], but the new filter only checks fordata.actual_data.action == 'created'. This means slash commands in edited comments will no longer trigger the handler. If this behavior change is intentional, it should be documented; otherwise, the filter should be updated to:data.actual_event_type == 'issue_comment' && data.actual_data.action in ['created', 'edited'] && data.command.name == 'assign'