Repository navigation
feat: demote members who miss the code of conduct deadline - #172
Merged
Merged
Conversation
jaspermayone
added this pull request to stack #173
October 9, 2026 16:33
jaspermayone
force-pushed
the
feature-coc-demote
branch
from
October 9, 2026 16:50
4d07da9 to
90cd13c
Compare
jaspermayone
force-pushed
the
feature-coc-demote
branch
from
October 9, 2026 17:22
ee2a742 to
b9894cd
Compare
jaspermayone
force-pushed
the
feature-coc-demote
branch
from
October 9, 2026 17:32
d2958b0 to
5ab1f23
Compare
jaspermayone
marked this pull request as ready for review
October 9, 2026 17:59
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
After the deadline, members who were asked and still have not accepted move back to single-channel guests in the code-of-conduct channel. From there they go through the same flow as a new member. Slack admins and owners cannot be demoted, so they get their own request with a box they must check.
Changes
SlackService#demote_to_guestuses the undocumentedusers.admin.setUltraRestrictedendpoint, with the same xoxc/xoxd auth aspromote_to_member.SlackService#workspace_admin?finds Slack admins and owners.DemoteForCodeOfConductJob: demotes a member, setsslack_membershiptopending, and sends a DM and an email. For a Slack admin, it sends the admin request instead.users.code_of_conduct_exempt) are not demoted.slack:coc:demote(preview unlessCONFIRM=1;ASKED_BEFORE=, default 14 days ago).docs/CODE_OF_CONDUCT.mdwith the runbook.Risk
I have not tested
users.admin.setUltraRestrictedagainst a live workspace. The endpoint name and itschannelparameter follow the legacy admin API. Test it on one account before you run the task for everyone.Test plan
bundle exec rspecbin/rubocop