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

Contrib/slackv3 readchannel #27985

Conversation

PaloSawyer
Copy link
Contributor

Contributing to Cortex XSOAR Content

Make sure to register your contribution by filling the contribution registration form

The Pull Request will be reviewed only after the contribution registration form is filled.

Status

  • In Progress
  • Ready
  • In Hold - (Reason for hold)

Description

This commit introduces three new integration commands to the SlackV3 integration. This will allow XSOAR developers to list channels, get conversations, and get threads related to conversations

Screenshots

Uploading ListChannels.png…
Uploading ConversationHistory.png…
Uploading ConversationReplies.png…

Minimum version of Cortex XSOAR

  • 6.5.0

Does it break backward compatibility?

  • No

Must have

  • Tests
  • Documentation

PaloSawyer and others added 30 commits February 3, 2023 10:57
…just code for conversation_history() to use the GET method instead of POST
…DK documentation (channel_types, exclude_archived, limit, and cursor). This now supports returning different kinds of channels, archived channels, and pagination with limit and cursor
…, raw response, and context for the list_channels command
Copy link
Contributor

@amshamah419 amshamah419 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code-wise on my end, it looks good. @maimorag let's just clarify the issues I mentioned a minute or so ago and we should be okay to approve/merge.

@bziser bziser self-requested a review August 23, 2023 11:12
# Conflicts:
#	Packs/Slack/Integrations/SlackV3/SlackV3.py
#	Packs/Slack/Integrations/SlackV3/SlackV3.yml
#	Packs/Slack/pack_metadata.json
@maimorag maimorag removed the request for review from bziser August 24, 2023 06:46
@maimorag maimorag added the ready-for-instance-test In contribution PRs, this label will cause a trigger of a build with a modified pack from the PR. label Aug 27, 2023
@content-bot
Copy link
Collaborator

For the Reviewer: Successfully created a pipeline in Gitlab with url: https://code.pan.run/xsoar/content/-/pipelines/6163300

@maimorag maimorag merged commit 97ad0a2 into demisto:contrib/PaloSawyer_contrib/Slackv3-readchannel Aug 27, 2023
15 of 23 checks passed
@content-bot content-bot mentioned this pull request Aug 27, 2023
7 tasks
maimorag added a commit that referenced this pull request Aug 30, 2023
* Contrib/slackv3 readchannel (#27985)

* Test SDK Commands

* Testing branch development

* forking with josh

* testing branch fork

* Add funtion to return the raw results of client.conversations_list for output validation and testing

* Add new command and arguments to yaml file. Make changes to list_conversations function for testing

* Added converstation_history command & function

* Add arguments to yml for the two new fucntions (list and history). Adjust code for conversation_history() to use the GET method instead of POST

* Added CommandResults to return output of the conversation_history command

* Fixed conversation_history CommandResults added commas to json objects

* For slack-list-channels, add the arguments that are outlined in the SDK documentation (channel_types, exclude_archived, limit, and cursor). This now supports returning different kinds of channels, archived channels, and pagination with limit and cursor

* Added raw-response & limit to conversation_history function

* Add name_filter argument to return a specific channels details. Also include basic context data parsing

* removed the 'int' type from limit

* Commented out CommandResults to continue building out response structure for context

* Add context outputs to yml configuration. Add CommandResults object for context, human readable, and raw output

* Update outputs with demisto.results(). Proper output of humanreadable, raw response, and context for the list_channels command

* conversation_history function working. Began working on mapping user IDs to usernames

* Added User ID to Username Mapping for converstation_history

* Began working on SlackV3_test.py. Need to added structured test data for conversation_history

* Modified conversation_history context output to align with code standards

* Added limit argument to conversation history command

* Added conversation ID for search, and identification of threads/replies in conversation_history command - RAF

* Added function conversation_replies to read threads from parent messages - RAF

* Updated get-replies to include Bot Responses

* Add user fetch for channel creator

* Adjust parsing and output for list_channels() for more consistency and less redundancy

* Updated conversation_replies & conversation_history with dict to list statement

* Added all Emoji commands

* Added more error handling to conversation_history and conversation_replies

* added description to the reaction commands

* Remove Emoji Functions and Commands

* Refactored conversation_history & conversation_replies to remove repeated variables and json

* Removed whitespace from the import statements and at the end of the integration

* adding RL

* adding unit tests

* accepted incoming changes

* added new test files

* Accepted Changes to both SlackV3 yaml and pack_metadata.json

* Added amshamah419 suggestions for conversation_history, list_channels, and conversation_replies

* Added correct error messaging to recommended return_error functions

* conflicts

* Fixed Flake8 E999 SyntaxError

* Resolved Flake8, Vulture, and Mypy Errors on SlackV3.py

* added .secrets-ignore file to pack and added a false positive secret

---------

Co-authored-by: RAF <rfontaine@protonmail.com>
Co-authored-by: maimorag <mmorag@paloaltonetworks.com>
Co-authored-by: edibleShell <56420357+edibleShell@users.noreply.github.com>
Co-authored-by: bziser <bziser@paloaltonetworks.com>
Co-authored-by: Mai Morag <81917647+maimorag@users.noreply.github.com>

* adding false secret to secrets ignore

* update release note

* adding the new commands to read me

* ruff error

* fixing unit test

* fixing unit test

* fixing unit tests

* docker image upgrade

* ifx unit tests test_list_channels

* fixing unit tests

* fix mypy

* remove unnecessary "get"

* updating yml

* adding display to yml

* updating unit test

* after running format

* Update Packs/Slack/Integrations/SlackV3/SlackV3.py

Co-authored-by: dorschw <81086590+dorschw@users.noreply.github.com>

* Update Packs/Slack/Integrations/SlackV3/SlackV3.py

Co-authored-by: dorschw <81086590+dorschw@users.noreply.github.com>

* Update Packs/Slack/Integrations/SlackV3/SlackV3.py

Co-authored-by: dorschw <81086590+dorschw@users.noreply.github.com>

* Update Packs/Slack/Integrations/SlackV3/SlackV3.py

Co-authored-by: dorschw <81086590+dorschw@users.noreply.github.com>

* Update Packs/Slack/ReleaseNotes/3_1_47.md

Co-authored-by: dorschw <81086590+dorschw@users.noreply.github.com>

* cr notes

* bump to 3.2.0

---------

Co-authored-by: Josh Sawyer <95762642+PaloSawyer@users.noreply.github.com>
Co-authored-by: RAF <rfontaine@protonmail.com>
Co-authored-by: maimorag <mmorag@paloaltonetworks.com>
Co-authored-by: edibleShell <56420357+edibleShell@users.noreply.github.com>
Co-authored-by: bziser <bziser@paloaltonetworks.com>
Co-authored-by: Mai Morag <81917647+maimorag@users.noreply.github.com>
Co-authored-by: dorschw <81086590+dorschw@users.noreply.github.com>
xsoar-bot pushed a commit to xsoar-contrib/content that referenced this pull request Oct 5, 2023
* Contrib/slackv3 readchannel (demisto#27985)

* Test SDK Commands

* Testing branch development

* forking with josh

* testing branch fork

* Add funtion to return the raw results of client.conversations_list for output validation and testing

* Add new command and arguments to yaml file. Make changes to list_conversations function for testing

* Added converstation_history command & function

* Add arguments to yml for the two new fucntions (list and history). Adjust code for conversation_history() to use the GET method instead of POST

* Added CommandResults to return output of the conversation_history command

* Fixed conversation_history CommandResults added commas to json objects

* For slack-list-channels, add the arguments that are outlined in the SDK documentation (channel_types, exclude_archived, limit, and cursor). This now supports returning different kinds of channels, archived channels, and pagination with limit and cursor

* Added raw-response & limit to conversation_history function

* Add name_filter argument to return a specific channels details. Also include basic context data parsing

* removed the 'int' type from limit

* Commented out CommandResults to continue building out response structure for context

* Add context outputs to yml configuration. Add CommandResults object for context, human readable, and raw output

* Update outputs with demisto.results(). Proper output of humanreadable, raw response, and context for the list_channels command

* conversation_history function working. Began working on mapping user IDs to usernames

* Added User ID to Username Mapping for converstation_history

* Began working on SlackV3_test.py. Need to added structured test data for conversation_history

* Modified conversation_history context output to align with code standards

* Added limit argument to conversation history command

* Added conversation ID for search, and identification of threads/replies in conversation_history command - RAF

* Added function conversation_replies to read threads from parent messages - RAF

* Updated get-replies to include Bot Responses

* Add user fetch for channel creator

* Adjust parsing and output for list_channels() for more consistency and less redundancy

* Updated conversation_replies & conversation_history with dict to list statement

* Added all Emoji commands

* Added more error handling to conversation_history and conversation_replies

* added description to the reaction commands

* Remove Emoji Functions and Commands

* Refactored conversation_history & conversation_replies to remove repeated variables and json

* Removed whitespace from the import statements and at the end of the integration

* adding RL

* adding unit tests

* accepted incoming changes

* added new test files

* Accepted Changes to both SlackV3 yaml and pack_metadata.json

* Added amshamah419 suggestions for conversation_history, list_channels, and conversation_replies

* Added correct error messaging to recommended return_error functions

* conflicts

* Fixed Flake8 E999 SyntaxError

* Resolved Flake8, Vulture, and Mypy Errors on SlackV3.py

* added .secrets-ignore file to pack and added a false positive secret

---------

Co-authored-by: RAF <rfontaine@protonmail.com>
Co-authored-by: maimorag <mmorag@paloaltonetworks.com>
Co-authored-by: edibleShell <56420357+edibleShell@users.noreply.github.com>
Co-authored-by: bziser <bziser@paloaltonetworks.com>
Co-authored-by: Mai Morag <81917647+maimorag@users.noreply.github.com>

* adding false secret to secrets ignore

* update release note

* adding the new commands to read me

* ruff error

* fixing unit test

* fixing unit test

* fixing unit tests

* docker image upgrade

* ifx unit tests test_list_channels

* fixing unit tests

* fix mypy

* remove unnecessary "get"

* updating yml

* adding display to yml

* updating unit test

* after running format

* Update Packs/Slack/Integrations/SlackV3/SlackV3.py

Co-authored-by: dorschw <81086590+dorschw@users.noreply.github.com>

* Update Packs/Slack/Integrations/SlackV3/SlackV3.py

Co-authored-by: dorschw <81086590+dorschw@users.noreply.github.com>

* Update Packs/Slack/Integrations/SlackV3/SlackV3.py

Co-authored-by: dorschw <81086590+dorschw@users.noreply.github.com>

* Update Packs/Slack/Integrations/SlackV3/SlackV3.py

Co-authored-by: dorschw <81086590+dorschw@users.noreply.github.com>

* Update Packs/Slack/ReleaseNotes/3_1_47.md

Co-authored-by: dorschw <81086590+dorschw@users.noreply.github.com>

* cr notes

* bump to 3.2.0

---------

Co-authored-by: Josh Sawyer <95762642+PaloSawyer@users.noreply.github.com>
Co-authored-by: RAF <rfontaine@protonmail.com>
Co-authored-by: maimorag <mmorag@paloaltonetworks.com>
Co-authored-by: edibleShell <56420357+edibleShell@users.noreply.github.com>
Co-authored-by: bziser <bziser@paloaltonetworks.com>
Co-authored-by: Mai Morag <81917647+maimorag@users.noreply.github.com>
Co-authored-by: dorschw <81086590+dorschw@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Contribution Form Filled Whether contribution form filled or not. Contribution Thank you! Contributions are always welcome! docs-approved pending-contributor The PR is pending the response of its creator ready-for-instance-test In contribution PRs, this label will cause a trigger of a build with a modified pack from the PR. Xsoar Support Level Indicates that the contribution is for XSOAR supported pack
Projects
None yet
8 participants