let mut references = Vec::new();
if let Some(body) = conv_commit.body {
references.extend(self.re_references.captures_iter(body.as_str()).map(
|refer| Reference {
// TODO action (the word before?)
action: None,
owner: "",
repository: "",
prefix: refer[1].to_owned(),
issue: refer[2].to_owned(),
raw: refer[0].to_owned(),
},
));
}
references.extend(conv_commit.footers.iter().flat_map(|footer| {
self.re_references
.captures_iter(footer.value.as_str())
.map(move |refer| Reference {
action: Some(footer.key.clone()),
owner: "",
repository: "",
prefix: refer[1].to_owned(),
issue: refer[2].to_owned(),
raw: refer[0].to_owned(),
})
}));