Skip to content
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

Sync OWASP Slack Workspace Channels/Groups List #923

Open
arkid15r opened this issue Feb 23, 2025 · 1 comment
Open

Sync OWASP Slack Workspace Channels/Groups List #923

arkid15r opened this issue Feb 23, 2025 · 1 comment
Assignees
Labels

Comments

@arkid15r
Copy link
Collaborator

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:

  1. Retrieve Slack channels and groups: Use Slack’s conversations.list API to fetch a list of channels and groups.
  2. Implement pagination: Since Slack API responses are paginated, ensure the command retrieves all channels with a limit of 200 per request.
  3. Store or update channel records: Populate or update the Conversation model with information about each channel.
  4. 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.

@github-project-automation github-project-automation bot moved this to Backlog in Project Nest Feb 23, 2025
@arkid15r arkid15r moved this from Backlog to In progress in Project Nest Feb 23, 2025
@space-techy
Copy link
Collaborator

Okay Sirr!
I will start working on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In progress
Development

No branches or pull requests

2 participants