-
Notifications
You must be signed in to change notification settings - Fork 13
Various improvements relating to Slack integration #187
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
Conversation
…d improve error handling
… conversation data handling
…details and log conversation information
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
Enhances the Slack integration for proposal channels by introducing detailed conversation retrieval and updating the GET endpoint to return richer channel information.
- Added
SlackConversationmodel andget_conversation_detailsservice to fetch full channel details including members. - Enriched
get_user_infowith bot status, real name, and pending invitation; increasedconversations_memberslimit. - Modified
/v1/proposal/{proposal_id}/slack-channelsendpoint to returnSlackConversationobjects viaget_conversation_details.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/nsls2api/services/slack_service.py | Introduce get_conversation_details, enhance get_user_info, adjust member retrieval, rename function |
| src/nsls2api/models/slack_models.py | Add SlackConversation and SlackUserProfile Pydantic models |
| src/nsls2api/api/v1/proposal_api.py | Change endpoint return type to SlackConversation and incorporate new service |
Comments suppressed due to low confidence (1)
src/nsls2api/services/slack_service.py:328
- Remove the
/1000.0division since Slack'supdatedtimestamp is in seconds, not milliseconds, to avoid incorrect date calculations.
info_response.get("channel", {}).get("updated", 0) / 1000.0
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
nmaytan
left a comment
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.
I looked through this and have just a couple suggestions
Co-authored-by: Nathanael (Nate) Maytan <mr.maytan@gmail.com>
Co-authored-by: Nathanael (Nate) Maytan <mr.maytan@gmail.com>
…in requirements-dev.txt
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The main improvement in this PR is to increase the usefulness of the GET endpoint
/v1/proposal/{proposal_id}/slack-channels.This will resolve #186.