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

Add support for Slack bot token authentication #1270

Merged

Conversation

RicardoLorenzo
Copy link

Adding Bearer token for using Slack apps instead of webhook as recommended by Slack and also used in Flux.

@stefanprodan
Copy link
Member

@RicardoLorenzo can you please document this feature in https://github.com/fluxcd/flagger/blob/main/docs/gitbook/usage/alerting.md Thanks!

@codecov-commenter
Copy link

codecov-commenter commented Sep 21, 2022

Codecov Report

Base: 54.68% // Head: 54.66% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (b116014) compared to base (89b0487).
Patch coverage: 58.82% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1270      +/-   ##
==========================================
- Coverage   54.68%   54.66%   -0.03%     
==========================================
  Files          81       81              
  Lines        6965     6972       +7     
==========================================
+ Hits         3809     3811       +2     
- Misses       2559     2562       +3     
- Partials      597      599       +2     
Impacted Files Coverage Δ
pkg/notifier/client.go 29.72% <0.00%> (-1.70%) ⬇️
pkg/notifier/factory.go 0.00% <0.00%> (ø)
pkg/controller/events.go 50.80% <50.00%> (-0.44%) ⬇️
pkg/notifier/slack.go 76.47% <80.00%> (+0.71%) ⬆️
pkg/notifier/discord.go 72.22% <100.00%> (ø)
pkg/notifier/gchat.go 88.88% <100.00%> (ø)
pkg/notifier/rocket.go 75.75% <100.00%> (ø)
pkg/notifier/teams.go 76.92% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@RicardoLorenzo
Copy link
Author

@RicardoLorenzo can you please document this feature in https://github.com/fluxcd/flagger/blob/main/docs/gitbook/usage/alerting.md Thanks!

Thank you! documentation added.

@RicardoLorenzo RicardoLorenzo force-pushed the slack_bot_token_authentication branch 3 times, most recently from 1376bc4 to b116014 Compare September 23, 2022 08:45
Signed-off-by: Ricardo Lorenzo <rlorenzo@payfone.com>
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @RicardoLorenzo 🎖️ I trust you've tested this with a Slack bot.

@RicardoLorenzo
Copy link
Author

Thanks @stefanprodan . I do have a Slack app indeed we used for this.

For your peace of mind, this is also referenced in here. The following works which is what we are doing here.

curl https://slack.com/api/conversations.list -H "Authorization: Bearer xoxb-1234..."

Thanks again!

@stefanprodan stefanprodan added the kind/enhancement Improvement request for an existing feature label Oct 18, 2022
@stefanprodan stefanprodan changed the title Slack bot token authentication Add support for Slack bot token authentication Oct 18, 2022
@stefanprodan stefanprodan merged commit 8197073 into fluxcd:main Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvement request for an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants