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: refactor Incident module to validate channel on command instead of in functions #727

Open
gcharest opened this issue Jan 21, 2025 · 0 comments
Assignees

Comments

@gcharest
Copy link
Contributor

Right now, the SRE Bot's commands functions each validate that the bot is in an incident channel to perform commands.

This validation could be done once only when the incident_helper is invoked to validate that the bot is actually called from an incident channel, if it is necessary.

def handle_incident_command(args, client: WebClient, body, respond: Respond, ack: Ack):

This way, validation is performed at the moment of calling the command instead of during the various tasks required to be performed.

@gcharest gcharest self-assigned this Jan 21, 2025
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

No branches or pull requests

1 participant