benjojo / alertmanager-discord

Take your alertmanager alerts, into discord
Apache License 2.0
177 stars 78 forks source link

Account for discord Webhook IDs with length 19 #30

Closed akshtshrma24 closed 2 years ago

akshtshrma24 commented 2 years ago

I recently created a webhook URL and noticed the length of the id differed from the expected 18 in main.go:87. We could change the regex to https://discord(?:app)?.com/api/webhooks/[0-9]{18,19}/[a-zA-Z0-9_-]+. If this looks good, im happy to open a tiny PR to resolve this.

benjojo commented 2 years ago

Sure, open up a PR

On Sun, 7 Aug 2022, 07:02 Cool Guy Awal, @.***> wrote:

I recently created a webhook URL and noticed the length of the id differed from the expected 18 in main.go:87 https://github.com/benjojo/alertmanager-discord/blob/ceceb475c7c0d5d08159e12898bfb8f6bcc66678/main.go#L87. We could change the regex to https://discord (?:app)?.com/api/webhooks/[0-9]{18,19}/[a-zA-Z0-9_-]+. If this looks good, im happy to open a tiny PR to resolve this.

— Reply to this email directly, view it on GitHub https://github.com/benjojo/alertmanager-discord/issues/30, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALPK4UDJOVKC3FD6HAXEHDVX5GO7ANCNFSM55Z5CSFA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

akshtshrma24 commented 2 years ago

sure open pr #31

akshtshrma24 commented 2 years ago

hey could you take a look at the pr please?

benjojo commented 2 years ago

Sorry about that, looks good, merged :)

akshtshrma24 commented 2 years ago

Hey, could you update the image to include the pr? Thanks!

benjojo commented 2 years ago

oh god dammit DockerHub stopped doing automatic builds, Give me a moment while I figure out how to unbreak that

benjojo commented 2 years ago

Finally did it, that was unpleasant. Hopefully with this feature being integrated into AlertManager officially, I won't have to do that again!