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

Feature: Send karma update messages to a dedicated slack channel #103

Open
JnyJny opened this issue Dec 1, 2021 · 6 comments
Open

Feature: Send karma update messages to a dedicated slack channel #103

JnyJny opened this issue Dec 1, 2021 · 6 comments
Assignees
Labels
Change Requests to change existing functionality

Comments

@JnyJny
Copy link
Contributor

JnyJny commented Dec 1, 2021

Premise:
It's fun handing out karma but it tends to be "noisy" in a channel, which can drown out some of the signal and make it difficult to scroll back in a channel and find threads. Also the amount of alerting that occurs that isn't really important could cause people to "ignore" channel updates and miss important stuff.

Feature:
Have karmabot send karma updates to a #karma channel instead of the channel it's listening in, maybe expand the update message to:

In <channel>, <giver> boosted <receiver>'s karma to <new karma value>
In <channel>, <taker> dropped <receiver>'s karma to <new karma value>

People who want to monitor karma can subscribe to the channel, or pop in on it whenever the fancy strikes.

This could be a global option, or maybe an option per channel? I'd prefer global but can see an argument for a per channel option.

@bbelderbos bbelderbos self-assigned this Jul 27, 2023
@bbelderbos
Copy link
Collaborator

Love this idea and it's needed now I am read this feedback:

... it always bugged me seeing unreads, hoping for some quality content and then discover it's just another karmabot post...

That is indeed annoying and needs fixing!

I will try to take a look at it. I recently set up the test slack so I have a way to test it first.

It's also fun to dive into this code base again since @pogross + team has really taken it to the next level!

@bbelderbos
Copy link
Collaborator

@JnyJny should these also go to this dedicated channel? Or maybe we remove this altogether?

image

@bbelderbos
Copy link
Collaborator

Looking at say() statements in src/karmabot/bot.py the change is pretty limited:

  • karma_action -> this say() needs to specify the dedicated channel we're logging this to
  • reply_help -> say(text=text, channel=user_id) = goes to user privately
  • reply_special_words -> see above, nuisance, consider skip (if so, log separate issue)
  • reply_commands -> bunch of say()s - seems all private DM to user stuff
  • welcome_new_user -> say(text=text, channel=user_id) = goes to user privately

So it seems the scope of the change really is only in karma_action

Old:
say(reply)

New:
say(text=text, channel=new_log_channel)

new_log_channel to be defined and ideally be loaded from a config variable (similar to KARMABOT_ID = get_env_var("KARMABOT_SLACK_USER")).

I thought it could be useful to also send a DM to the user that their karma has been increased, but given that the at ping already triggers a notification that seems redundant.

@JnyJny
Copy link
Contributor Author

JnyJny commented Jul 27, 2023

IMHO, I'd take out anything that triggers karmabot to output something when it's not being specifically addressed.

I don't think DMing the karma target is good idea, it could be used to spam a target with tons of karma and a pile of DMs that are just noise.

@pmayd
Copy link
Collaborator

pmayd commented Jul 27, 2023

will have a look...when I am able to spin up the dev env for this. Good that I am on Mac now

@ajkerrigan
Copy link
Contributor

Avoiding channel or DM spam seems good, though I could see adding reactions instead? Like an up arrow for karma bumps or 🍻 to cheers.

... Although maybe that'd be a separate issue and pr 🤔

bbelderbos added a commit to bbelderbos/karmabot that referenced this issue Jul 28, 2023
bumped version
upgraded pre-commit
pre-commit mypy errors: removed int type hint from KarmaNote + changed | to Union (which should have been supported hm)
bbelderbos added a commit that referenced this issue Jul 31, 2023
…ES (#114)

* bump version

* fix action file

* Update README.md

* Update README.md

* Update README.md

* Update .pre-commit-config.yaml

#107

* test commit

* add a runtime

* bug toml file:

remote: -----> Add Poetry to the PATH
remote: -----> Export requirements.txt from Poetry
remote:
remote:          TOMLError
remote:
remote:          Invalid TOML file /tmp/build_fd4bfa75/pyproject.toml: Key "name" already exists.

* another duplicated key:

remote: -----> Add Poetry to the PATH
remote: -----> Export requirements.txt from Poetry
remote:
remote:          TOMLError
remote:
remote:          Invalid TOML file /tmp/build_0b421871/pyproject.toml: Key "version" already exists.

* fix for #103
bumped version
upgraded pre-commit
pre-commit mypy errors: removed int type hint from KarmaNote + changed | to Union (which should have been supported hm)

* fix test

* fixes #113

* update readme
@pogross pogross added the Change Requests to change existing functionality label Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Change Requests to change existing functionality
Projects
None yet
Development

No branches or pull requests

5 participants