Parent Epic
#164 — Cancel workflow on unassignment
Description
Update the GitHub and GitLab webhook handlers to produce the new unassigned trigger types when an issue is unassigned.
Tasks
- GitHub (
src/webhook/github.rs): In map_to_trigger_event(), add a match arm for (GITHUB_ISSUES, "unassigned") → TriggerType::GithubIssueUnassigned { assigned_to }. The assignee field is still present in the payload (it's the user who was unassigned).
- GitLab (
src/webhook/gitlab.rs): In map_to_trigger_event(), the IssueHook currently only matches action == "update". Update it to distinguish between assignment and unassignment. GitLab fires "update" action for both — check the payload's changes.assignees field (previous vs. current). If assignees were removed, emit GitlabIssueUnassigned. If assignees were added, emit GitlabIssueAssigned as before.
- Update
src/webhook/mod.rs handle_webhook() if needed to ensure unassign events are dispatched to the dispatcher.
Exit Criteria
- Unassign webhook payloads from both platforms produce the correct
TriggerType variants
- Test coverage for both platforms
Dependencies
- Task 2 (new
TriggerType variants must exist)
Parent Epic
#164 — Cancel workflow on unassignment
Description
Update the GitHub and GitLab webhook handlers to produce the new unassigned trigger types when an issue is unassigned.
Tasks
src/webhook/github.rs): Inmap_to_trigger_event(), add a match arm for(GITHUB_ISSUES, "unassigned")→TriggerType::GithubIssueUnassigned { assigned_to }. Theassigneefield is still present in the payload (it's the user who was unassigned).src/webhook/gitlab.rs): Inmap_to_trigger_event(), theIssueHookcurrently only matchesaction == "update". Update it to distinguish between assignment and unassignment. GitLab fires"update"action for both — check the payload'schanges.assigneesfield (previous vs. current). If assignees were removed, emitGitlabIssueUnassigned. If assignees were added, emitGitlabIssueAssignedas before.src/webhook/mod.rshandle_webhook()if needed to ensure unassign events are dispatched to the dispatcher.Exit Criteria
TriggerTypevariantsDependencies
TriggerTypevariants must exist)