Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(slack): clean up empty cmd handling #424

Merged
merged 2 commits into from
Nov 9, 2020

Conversation

sgandon
Copy link
Contributor

@sgandon sgandon commented Oct 30, 2020

ISSUE TYPE
  • Bug fix Pull Request
SUMMARY

The empty command @BotKube is managed in the executor.go file for having a identic behaviour on all intergrations but the Slack bot is handling it differently.
So I proposed a cleanup in this PR.

if len(sm.Request) == 0 {
return
}
sm.Request = strings.TrimPrefix(sm.Event.Text, "<@"+sm.BotID+">")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does empty command e.g @BotKube return an error message now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it does.
this is managed by the executor : https://github.com/infracloudio/botkube/pull/424/files#diff-fccd3962f0d0da63e38e16963f1ac9ecdc37cbbe33beed7e6aee1d0de163f4e1R183
This way there is a common behaviour between all integrations

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sgandon could you confirm this? Rest looks good

@sgandon
Copy link
Contributor Author

sgandon commented Nov 9, 2020

Sorry about that my response was in pending state, I forgot to submit it.

@PrasadG193
Copy link
Collaborator

Cool! Thanks @sgandon

@mergify mergify bot merged commit cb8ed93 into kubeshop:develop Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants