RamblingCookieMonster / PSSlack

PowerShell module for simple Slack integration
http://ramblingcookiemonster.github.io/PSSlack/
MIT License
273 stars 74 forks source link

New-SlackMessageAttachment: "Severity" parameter syntax incorrect and the parameter also appears non-functional? #107

Open jeffreymcclain opened 4 years ago

jeffreymcclain commented 4 years ago

https://github.com/RamblingCookieMonster/PSSlack/blob/master/PSSlack/Public/New-SlackMessageAttachment.ps1

.PARAMETER Severity Only good, bad and warning are accepted by this parameter.

However, when testing this in VSCode, the error message states:

Cannot validate argument on parameter 'Severity'. The argument "bad" does not belong to the set "good,warning,danger" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.

Also, I tried sending 3 different message attachments (one for each of the 3 severity levels), and the "border along the left side of the message attachment" was gray in all 3 cases. Based on the documentation, I assume that it is supposed to change color.

For reference, I am running PowerShell 7 within Visual Studio Code on Windows 10 v1909 and using the latest version of the PSSlack module (1.0.2 from the PowerShell Gallery).