Rocket username and channel are mandatory but not documented
GJKrupa opened this issue · 3 comments
The documentation for the Rocket notification provider says the following:
To configure a Provider for Rocket, create a Secret with the address set to the Rocket webhook URL, and a rocket Provider with a Secret reference.
However, the provider code checks for the presence of both username and channel properties as well and will error leaving it in a not ready state if these are not provided:
if username == "" {
return nil, errors.New("empty Rocket username")
}
if channel == "" {
return nil, errors.New("empty Rocket channel")
}
If a webhook URL is used, neither the username not the channel should be required since these are both tied to the webhook URL in the Rocket workspace configuration.
@GJKrupa You are right, from the rocket documentation, the channel and username are not required.
Do you want to raise a PR to fix this. We can take out the checks in the NewRocket
function and only set the channel/username in the slack payload if they are provided