Skip to content

#164.3 — Webhook handlers: detect unassignment events #179

Description

@zeroklaw

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions