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

Support channel-based group mapping for Cloud Teams #1327

Merged
merged 2 commits into from
Dec 4, 2023

Conversation

pkosiec
Copy link
Collaborator

@pkosiec pkosiec commented Dec 1, 2023

Description

Changes proposed in this pull request:

  • Support channel-based group mapping for Cloud Teams
  • Fallback to channel ID for group mapping in channel-based approach, when conversation ID is empty
  • Bump Go and import reviser

Testing

You can run Botkube against Botkube Cloud with export BOTKUBE_SETTINGS_LOG_LEVEL=debug.

And then see something like:

DEBU[2023-12-01T17:49:44+01:00] Generating Kubeconfig...                      component="Botkube Plugin Executor" input="{General}"

or

DEBU[2023-12-01T17:49:44+01:00] Generating Kubeconfig...                      component="Botkube Plugin Executor" input="{retail2}"

@pkosiec pkosiec added the enhancement New feature or request label Dec 1, 2023
@pkosiec pkosiec force-pushed the handle-channel-mapping-teams branch from dc0a32f to 9734796 Compare December 1, 2023 16:59
@pkosiec pkosiec requested a review from mszostok December 1, 2023 17:13
@pkosiec pkosiec added this to the v1.7.0 milestone Dec 1, 2023
@pkosiec pkosiec marked this pull request as ready for review December 1, 2023 20:02
@pkosiec pkosiec requested a review from PrasadG193 as a code owner December 1, 2023 20:02
@pkosiec pkosiec requested a review from a team December 1, 2023 20:02
@@ -81,9 +81,16 @@ func (e *PluginExecutor) Execute(ctx context.Context, bindings []string, slackSt
return interactive.CoreMessage{}, fmt.Errorf("while collecting configs: %w", err)
}

channel := cmdCtx.Conversation.DisplayName
Copy link
Collaborator

Choose a reason for hiding this comment

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

it may be useful to put it in the docs 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure, honestly, as we use channel name for all platforms: https://docs.botkube.io/configuration/rbac#mapping-types

image

The fallback I did is for e.g. new platforms if we forget passing display name.

Does it make sense?

Copy link
Collaborator

@mszostok mszostok left a comment

Choose a reason for hiding this comment

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

🚀

@pkosiec pkosiec merged commit aec0dd9 into kubeshop:main Dec 4, 2023
15 checks passed
@pkosiec pkosiec deleted the handle-channel-mapping-teams branch December 4, 2023 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants