Skip to content

Commit ca05226

Browse files
committed
Removing the slack webhook url check, since we can use this other slack compatible APIs
Ref - ashwanthkumar/gocd-slack-build-notifier#36 and ashwanthkumar/gocd-slack-build-notifier#23
1 parent fe78b29 commit ca05226

2 files changed

Lines changed: 0 additions & 7 deletions

File tree

src/main/java/in/ashwanthkumar/slack/webhook/Slack.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ public class Slack {
2222
public Slack(String webhookUrl) {
2323
if (isEmpty(webhookUrl)) {
2424
throw new IllegalArgumentException("Webhook url is not provided");
25-
} else if (!webhookUrl.startsWith("https://hooks.slack.com/services/")) {
26-
throw new IllegalArgumentException("Slack Webhook url starts with https://hooks.slack.com/services/");
2725
}
2826
this.webhookUrl = webhookUrl;
2927
}

src/test/java/in/ashwanthkumar/slack/webhook/SlackTest.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,4 @@ public void shouldThrowIllegaArgumentExceptionWhenWebHookUrlIsNotGiven() {
4040
new Slack(null);
4141
}
4242

43-
@Test(expected = IllegalArgumentException.class)
44-
public void shouldThrowIllegalArgumentExceptionWhenUrlIsNotInSlacWebHookFormat() {
45-
new Slack("http://www.foo.com/webhooks");
46-
}
47-
4843
}

0 commit comments

Comments
 (0)