return res.getString(R.string.event_commit_comment_title,
comment.getCommitId().substring(0, 7), formatFromRepoName(eventRepo));
}
} else if (Event.TYPE_PUSH.equals(eventType)) {
PushPayload payload = (PushPayload) event.getPayload();
<BUG>String[] refPart = payload.getRef().split("/");
return res.getString(R.string.event_push_title,
refPart.length == 3 ? refPart[2] : payload.getRef(),
formatFromRepoName(eventRepo));
} else if (Event.TYPE_RELEASE.equals(eventType)) {</BUG>
return res.getString(R.string.event_release_title, formatFromRepoName(eventRepo));

return res.getString(R.string.event_commit_comment_title,
comment.getCommitId().substring(0, 7), formatFromRepoName(eventRepo));
}
} else if (Event.TYPE_PUSH.equals(eventType)) {
PushPayload payload = (PushPayload) event.getPayload();
String ref = payload.getRef();
if (ref.startsWith("refs/heads/")) {
ref = ref.substring(11);
}
return res.getString(R.string.event_push_title, ref, formatFromRepoName(eventRepo));
} else if (Event.TYPE_RELEASE.equals(eventType)) {
return res.getString(R.string.event_release_title, formatFromRepoName(eventRepo));
