Parent Epic
#164 — Cancel workflow on unassignment
Description
Add two new TriggerType variants to represent unassignment events, so the type system distinguishes them from assignment at compile time rather than relying on runtime string comparison.
Tasks
- Add two new
TriggerType variants: GithubIssueUnassigned { assigned_to: Option<String> } and GitlabIssueUnassigned { assigned_to: Option<String> }
- Add string constants in
triggers module: GITHUB_ISSUE_UNASSIGNED and GITLAB_ISSUE_UNASSIGNED
- Implement
Display, from_trigger(), label(), platform(), webhook_event(), and known_variables() for the new variants
webhook_event() should return the same event type as the assignment variants (GitHub: "issues", GitLab: "issues_events") since unassigned comes from the same webhook event type, just with a different action
known_variables() should mirror the assignment variants (same template variables: issue_number, assignee, etc.)
Exit Criteria
- New variants compile, display correctly, and round-trip through
from_trigger → label → from_trigger
- No dependencies — can be done in parallel with Task 1
Parent Epic
#164 — Cancel workflow on unassignment
Description
Add two new
TriggerTypevariants to represent unassignment events, so the type system distinguishes them from assignment at compile time rather than relying on runtime string comparison.Tasks
TriggerTypevariants:GithubIssueUnassigned { assigned_to: Option<String> }andGitlabIssueUnassigned { assigned_to: Option<String> }triggersmodule:GITHUB_ISSUE_UNASSIGNEDandGITLAB_ISSUE_UNASSIGNEDDisplay,from_trigger(),label(),platform(),webhook_event(), andknown_variables()for the new variantswebhook_event()should return the same event type as the assignment variants (GitHub:"issues", GitLab:"issues_events") since unassigned comes from the same webhook event type, just with a different actionknown_variables()should mirror the assignment variants (same template variables:issue_number,assignee, etc.)Exit Criteria
from_trigger → label → from_trigger