-
-
Notifications
You must be signed in to change notification settings - Fork 313
[WIP] Add ability for users to connect Slack for daily reminders #4708
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
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. Comment |
Co-authored-by: DonnieBLT <[email protected]>
Co-authored-by: DonnieBLT <[email protected]>
|
@copilot continue |
Co-authored-by: DonnieBLT <[email protected]>
Completed! All tasks from the PR checklist have been finished (commit f5a7caf). What was done:
Slack Integration Features:
UI Changes:
Environment variables needed: The management command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds Slack integration to the daily reminders feature, enabling users to receive daily check-in reminders via Slack DMs in addition to email notifications.
Key changes:
- Implements Slack OAuth flow for connecting user accounts
- Adds database fields to store Slack user IDs and notification preferences
- Extends the daily reminder command to send Slack DMs when enabled
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| website/views/daily_reminders.py | Added OAuth flow views (connect, callback, disconnect) and test Slack reminder functionality |
| website/test_slack_connection.py | Added comprehensive test coverage for Slack connection features |
| website/templates/website/reminder_settings.html | Added UI for Slack integration with connection status and test button |
| website/models.py | Added slack_user_id to UserProfile and slack_notifications_enabled to ReminderSettings |
| website/migrations/0247_add_slack_connection_fields.py | Database migration for new Slack-related fields |
| website/management/commands/daily_checkin_reminder.py | Extended reminder command to send Slack DMs |
| website/forms.py | Added slack_notifications_enabled field to ReminderSettingsForm |
| blt/urls.py | Added URL patterns for Slack OAuth endpoints |
| except Exception as e: | ||
| logger.error(f"Error sending Slack reminder to {userprofile.user.username}: {str(e)}") |
Copilot
AI
Nov 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error message includes the exception using str(e), which violates the project guideline that states 'dont include exceptions in error messages but be very detailed in text what the error is'. Consider logging a more descriptive error message without including the raw exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot apply changes based on this feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 6a6462f. Removed str(e) from error messages and added detailed descriptive messages without exposing the raw exception. Now catching SlackApiError specifically with appropriate error descriptions.
Co-authored-by: Copilot <[email protected]>
…, configurable URL Co-authored-by: DonnieBLT <[email protected]>
All code review feedback has been addressed in commit 6a6462f. The PR is complete and ready for final review: Security improvements implemented:
Configuration improvements:
All formatters have been run and tests updated to match the new security model. |
|
@copilot fix the precommit issues |
…ve conflicts Co-authored-by: DonnieBLT <[email protected]>
Updated and conflicts resolved in commit 97b199d. Merge details:
All conflicts resolved, formatters run, and branch is now up to date with main. |
|
@copilot apply changes based on the comments in this thread and fix the conflicts too please keep the changes that we make only related to this feature |
Co-authored-by: DonnieBLT <[email protected]>
Fixed in commit 80494f6. Changes made:
All pre-commit checks pass (black, isort, ruff). |
|
@copilot fix conflicts please |
Co-authored-by: DonnieBLT <[email protected]>
Fixed in commit e8a2619. Conflicts resolved:
All pre-commit checks pass. |
|
📅 PR Updated This pull request was last updated on: Sat, 06 Dec 2025 06:38:58 GMT This comment is automatically updated when the PR is synchronized with the base branch. |
Summary
This PR adds the ability for users to connect their Slack accounts to receive daily check-in reminders via Slack Direct Messages.
Key Features:
Changes:
slack_user_idfield to UserProfile modelslack_notifications_enabledfield to ReminderSettings modelSecurity Improvements:
Configuration:
BASE_URLsetting instead of hardcodedOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.