Issue #2466: Slack: support description change events at column level (#2467)

This commit is contained in:
Sriharsha Chintalapani 2022-01-26 21:11:15 -08:00 committed by GitHub
parent 4cd5c2bea2
commit c529465c60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,6 +124,10 @@ public class SlackWebhookEventPublisher extends AbstractEventPublisher {
String followers = parseFollowers((List<EntityReference>) fieldChange.getNewValue());
String entityUrl = getEntityUrl(event);
attachment.setText(followers + " started following " + entityUrl);
} else if (fieldChange.getName().contains("description")) {
title.append("Added description to ");
title.append(fieldChange.getName());
attachment.setText((String) fieldChange.getNewValue());
}
attachment.setTitle(title.toString());
attachments.add(attachment);
@ -146,7 +150,8 @@ public class SlackWebhookEventPublisher extends AbstractEventPublisher {
if (fieldChange.getName().equals("owner")) {
attachment.setText(parseOwnership((String) fieldChange.getOldValue(), (String) fieldChange.getNewValue()));
} else {
attachment.setText((String) fieldChange.getNewValue());
String updatedStr = fieldChange.getOldValue() + " to " + fieldChange.getNewValue();
attachment.setText(updatedStr);
}
attachments.add(attachment);
}