diff --git a/src/event.rs b/src/event.rs index 4f1a140..0125d3e 100644 --- a/src/event.rs +++ b/src/event.rs @@ -185,7 +185,7 @@ impl fmt::Display for IssueAction { #[derive(Debug, Deserialize)] pub struct IssueObjectAttributes { - pub id: u32, + pub iid: u32, pub title: String, pub action: IssueAction, pub url: String, @@ -406,7 +406,7 @@ impl GitlabEventExt for GitlabEvent { if object_attributes.action != IssueAction::Other { let title = format!( "Issue #{} **{}**: {}", - object_attributes.id, object_attributes.action, object_attributes.title + object_attributes.iid, object_attributes.action, object_attributes.title ); vec![markdown_link(&title, &object_attributes.url)] } else { @@ -587,7 +587,7 @@ mod test { .. } => { assert_eq!(user.name, "Administrator"); - assert_eq!(object_attributes.id, 301); + assert_eq!(object_attributes.iid, 23); assert_eq!(object_attributes.action, IssueAction::Open); } _ => panic!("not an issue event"),