Better tag_push message
This commit is contained in:
parent
11be50d89f
commit
d74c30132c
@ -223,8 +223,10 @@ impl GitlabEventExt for GitlabEvent {
|
|||||||
GitlabEvent::TagPush {
|
GitlabEvent::TagPush {
|
||||||
checkout_sha, commits, ..
|
checkout_sha, commits, ..
|
||||||
} => find_commit(commits, &checkout_sha)
|
} => find_commit(commits, &checkout_sha)
|
||||||
.map(|commit| commit.title.clone())
|
.iter()
|
||||||
.unwrap_or_else(|| "New tag pushed".to_string()),
|
.fold("New tag pushed".to_string(), |accum, commit| {
|
||||||
|
format!("{} ({})", accum, commit.title)
|
||||||
|
}),
|
||||||
GitlabEvent::MergeRequest { object_attributes, .. } => {
|
GitlabEvent::MergeRequest { object_attributes, .. } => {
|
||||||
format!("MR {}: {}", object_attributes.action.as_str(), object_attributes.title)
|
format!("MR {}: {}", object_attributes.action.as_str(), object_attributes.title)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user