alertmanager icon indicating copy to clipboard operation
alertmanager copied to clipboard

Trim contents of slack api urls from files

Open srhb opened this issue 3 years ago • 3 comments

Trailing newlines will almost always be present in a posixish file, so trim it away at first opportunity to prevent having invalid URLs we won't discover until a notification is sent.

srhb avatar May 23 '22 08:05 srhb

Can you please fix the DCO and create a test case for this? Thanks!

gotjosh avatar Jun 13 '22 14:06 gotjosh

Sure, here you go :smile_cat:

srhb avatar Jul 29 '22 07:07 srhb

you'd need to fix the test

notify/slack/slack_test.go:88:12: undeclared name: `ioutil` (typecheck)
	f, err := ioutil.TempFile("", "slack_test_newline")
	          ^
make: *** [Makefile.common:198: common-lint] Error 1

Exited with code exit status 2

simonpasquier avatar Aug 05 '22 13:08 simonpasquier

thanks!

simonpasquier avatar Sep 09 '22 14:09 simonpasquier