You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 as entity_id
created → Stored as created_at
name → Channel name
is_private → Boolean indicating if the channel is private
is_archived → Boolean indicating if the channel is archived
is_general → Boolean indicating if it’s the general channel
topic.value → The topic of the channel
purpose.value → The purpose of the channel
creator → Stored as creator_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.
The text was updated successfully, but these errors were encountered:
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 theslack
app.Functionality:
conversations.list
API to fetch a list of channels and groups.Conversation
model with information about each channel.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 channelConsiderations:
Command Execution:
Run the command using the following:
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.The text was updated successfully, but these errors were encountered: