Skip to content

Commit

Permalink
CR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
arikalon1 committed Aug 6, 2021
1 parent 8934692 commit d53f313
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## v0.4.51
**New Features**:
- Sinks: From now on, no need to explicitly publish playbook results to a specific target.
- Sinks - **Breaking Changes**: From now on, no need to explicitly publish playbook results to a specific target.

Within the playbook's code we only need to create a ``Finding`` object. It will be published to the configured ``sinks``

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/playbook-configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Playbooks sinks
| **Note:** Create your Robusta account, to get the ``token`` for the Robusta sink `here <https://robusta.dev>`_ .
| **Note:** Slack sink ``api_key`` is added during the installation process.
| **Note:** The Slack sink ``api_key`` is added during the installation process.
| In order to get a new key run: ``robusta integrations get-integration-key --integration-type slack``.
| By default, all playbooks will forward the results to the default sinks.
Expand Down
2 changes: 2 additions & 0 deletions src/robusta/integrations/slack/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def __apply_length_limit(msg: str, max_length: int = 3000):
truncator = "..."
return msg[: max_length - len(truncator)] + truncator

@staticmethod
def __to_slack_diff(block: DiffsBlock, sink_name: str) -> List[SlackBlock]:
num_additions = len([d for d in block.diffs if d.diff_type == DiffType.ADDED])
num_subtractions = len(
Expand Down Expand Up @@ -92,6 +93,7 @@ def __to_slack_diff(block: DiffsBlock, sink_name: str) -> List[SlackBlock]:

return slack_blocks

@staticmethod
def __to_slack(block: BaseBlock, sink_name: str) -> List[SlackBlock]:
if isinstance(block, MarkdownBlock):
if not block.text:
Expand Down

0 comments on commit d53f313

Please sign in to comment.