-
-
Notifications
You must be signed in to change notification settings - Fork 182
Closed
Description
Overview:
Develop a Django management command for OWASP NestBot that syncs Slack channels and groups from the OWASP Slack workspace. The command will fetch data from Slack’s API and populate the Conversation
model in the slack
app.
Functionality:
- Retrieve Slack channels and groups: Use Slack’s
conversations.list
API to fetch a list of channels and groups. - Implement pagination: Since Slack API responses are paginated, ensure the command retrieves all channels with a limit of 200 per request.
- Store or update channel records: Populate or update the
Conversation
model with information about each channel. - Error handling and logging: Ensure the command handles potential errors (e.g., API issues) and logs the actions for visibility.
Expected Data Fields:
Each Slack channel object contains the following fields:
id
→ Stored asentity_id
created
→ Stored ascreated_at
name
→ Channel nameis_private
→ Boolean indicating if the channel is privateis_archived
→ Boolean indicating if the channel is archivedis_general
→ Boolean indicating if it’s the general channeltopic.value
→ The topic of the channelpurpose.value
→ The purpose of the channelcreator
→ Stored ascreator_id
, the ID of the user who created the channel
Considerations:
- The command should be idempotent, meaning it should update existing records and avoid duplicating data.
Command Execution:
Run the command using the following:
python manage.py slack_sync_conversation_list
This task will ensure that all Slack channels and groups from the OWASP workspace are correctly synced into the Conversation
model, keeping the records up-to-date with the latest information from Slack.
space-techy
Metadata
Metadata
Assignees
Type
Projects
Status
Done