Skip to content
This repository has been archived by the owner on Nov 17, 2018. It is now read-only.

Commit

Permalink
Merge pull request #32 from aveao/patch-1
Browse files Browse the repository at this point in the history
Add support for canary/ptb webhooks
  • Loading branch information
jupjohn committed Sep 17, 2018
2 parents bb94b8f + 38ca685 commit 025e84b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public static final class DescriptorImpl extends BuildStepDescriptor<Publisher>
public boolean isApplicable(Class<? extends AbstractProject> aClass) { return true; }

public FormValidation doCheckWebhookURL(@QueryParameter String value) {
if (!value.matches("https://discordapp\\.com/api/webhooks/\\d{18}/(\\w|-|_)*(/?)"))
if (!value.matches("https://(canary.|ptb.|)discordapp\\.com/api/webhooks/\\d{18}/(\\w|-|_)*(/?)"))
return FormValidation.error("Please enter a valid Discord webhook URL.");
return FormValidation.ok();
}
Expand Down

0 comments on commit 025e84b

Please sign in to comment.