This repository was archived by the owner on Nov 24, 2023. It is now read-only.
Draft
Conversation
Contributor
|
Hmm. There are some very nice aspects to that change, although the templates and the fact that we have to add in another library (for not much benefit) is not great. As a simple solution to fix the lack of console messages, could we just use the logger inside the post function to send a message to the console? We can then rely on the tests to ensure the message is well formed (and if we can't, then we should fix that anyway) def post(text, channel="interactive-requests"):
logger.DEBUG(f"Sending message to {{channel}}") # Could use a different logging level
if settings.DEBUG: # pragma: no cover
return
try:I'm not sure the no-op in DEBUG mode is helpful either, thinking about it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why?
The console backend for emails is really useful when you're working locally. I would like to have that for slack messages too.
We have a very nice DX with our current implementation, in particular but not limited to:
There are a couple of small frustrations when working with it locally:
The first bullet point caught me out when running through OSI and knowing that a message would be sent but seeing nothing in my console.
This is a test to see how the
django-slackpackage works out.Some pros from usage:
Some cons:
extends django_slackin the template dynamically looks up the necessary template and was quite unexpected