Repository navigation
feat: ask legacy slack members to accept the code of conduct - #170
Merged
Merged
Conversation
jaspermayone
added this pull request to stack #173
October 9, 2026 16:33
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
Members who joined the Slack before the code-of-conduct flow are full members with no
slack_coc_accepted_at. Nothing asked them to accept. Many of them also have the placeholder nameNOTSETfrom the Slack import.This PR asks them to accept, by Slack DM and by email, and collects a missing name at the same time.
Changes
User#slack_onboarding_stepreturns:accept_code_of_conductfor a full member without an acceptance./and the profile banner send them to/slack.User.code_of_conduct_pendingandUser.name_missingscopes, andUser#name_missing?(NOTSET,Unknown,User).CodeOfConductAcceptanceservice records the acceptance and a missing name. The/slackpage and the Slack form both use it.CodeOfConductSlackViews. The DM has a header, the message paragraphs, a "Read it" button for the Code of Conduct, the accept button, and a link to/slack.views.open). The form has a required "I have read and accept the Code of Conduct" box and a note on how we use the data. The submission uses the submitting Slack user, never a value from the form.legal_first_name/legal_last_name, never sent to apps,PushSlackNameJobsets only the Slack display name when there is a nickname, so the preferred name stays out of Slack. Without one, it sets the Slack first and last name to the preferred name./slackaccept step has the same box (required, checked on the server), the same name fields and hints, and the same data-use note. The text is inconfig/locales/code_of_conduct_form.en.yml.SlackCodeOfConductAcceptedJobdoes not promote someone who is already a full member. It replaces the DM when it gets the message reference.CodeOfConductRequestJobsends the DM and the email, and sets the newslack_coc_requested_atcolumn.config/locales/code_of_conduct_request.en.yml.slack:coc:statusandslack:coc:request(preview unlessSEND=1;DEADLINE=,REMIND=1).Test plan
bundle exec rspecbin/rails testbin/rubocop,bin/brakeman/slack.This PR has a migration.