Skip to content

Commit

Permalink
fix: update tag from Warn to Warning (#1830)
Browse files Browse the repository at this point in the history
Based on UI feedback
  • Loading branch information
ev-codes authored Jan 26, 2024
1 parent 3a54502 commit c5d2d1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.util.regex.Pattern;

final class WebhookConnectorValidationUtil {
private static final String WARN_TAG = "Warn";
private static final String WARNING_TAG = "Warning";
// Reflect changes to this pattern in webhook element templates
private static final Pattern CURRENT_WEBHOOK_PATH_PATTERN =
Pattern.compile("^[a-zA-Z0-9]+([-_][a-zA-Z0-9]+)*$");
Expand All @@ -36,7 +36,7 @@ static void logIfWebhookPathDeprecated(ActiveInboundConnector connector, String
if (!CURRENT_WEBHOOK_PATH_PATTERN.matcher(webhook).matches()) {
String message =
DEPRECATED_WEBHOOK_MESSAGE_PREFIX + webhook + DEPRECATED_WEBHOOK_MESSAGE_SUFFIX;
Activity activity = Activity.level(Severity.WARNING).tag(WARN_TAG).message(message);
Activity activity = Activity.level(Severity.WARNING).tag(WARNING_TAG).message(message);

connector.context().log(activity);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public void webhookPathLogIfInvalidCharacters(String webhookPath) {
verify(processA1.context(), times(1)).log(activityCaptor.capture());
Activity passedActivity = activityCaptor.getValue();
assertEquals(Severity.WARNING, passedActivity.severity());
assertEquals("Warn", passedActivity.tag());
assertEquals("Warning", passedActivity.tag());
assertTrue(passedActivity.message().contains(webhookPath));

assertWebhookRegistered(webhookPath, webhook, processA1);
Expand Down

0 comments on commit c5d2d1d

Please sign in to comment.