Skip to content

Allow user to disable private channels#7

Open
andrewrjones wants to merge 2 commits intosinger-io:masterfrom
gocardless:upstream-public-channels-only
Open

Allow user to disable private channels#7
andrewrjones wants to merge 2 commits intosinger-io:masterfrom
gocardless:upstream-public-channels-only

Conversation

@andrewrjones
Copy link
Copy Markdown

Description of change

Previously, even if we didn't want to sync private groups, the calls to
the Slack API would fail as the calls we made defined the types as
"public_channel,private_channel".

There is now an optional config, private_channels, that allows the
user to disable private channels in the config file.

By default, we will still get private channels. This requires the extra
groups: scopes.

Also added documentation for the config file.

Manual QA steps

  • Run the tap without any additional config and it should perform as it did previously

  • Run the tap with "private_channels":true and it should perform as it did previously

  • Run the tap with "private_channels":false and it will now only sync public channels

  • Run the tap without any additional config and with a Slack account that does not have the group: permissions and it will fail with the following:

slack.errors.SlackApiError: The request to the Slack API failed.
The server responded with: {'ok': False, 'error': 'missing_scope', 'needed': 'groups:read', 'provided': 'channels:history,channels:read,users:read'}
  • Run the tap with the same Slack account and with "private_channels":false and it will now only sync public channels and not fail with an error

Risks

  • No test coverage

Rollback steps

  • revert this branch

By default, we will still get private channels. This requires the extra
`groups:` scopes.

Previously, even if we didn't want to sync private groups, the calls to
the Slack API would fail as the calls we made defined the types as
`"public_channel,private_channel"`.

There is now an optional config, `private_channels`, that allows the
user to disable private channels in the config file.

Also added documentation for the config file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant