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

Slack: Add support for (some) groups #5019

Merged
merged 3 commits into from
Jul 31, 2022

Conversation

rtuin
Copy link
Contributor

@rtuin rtuin commented Jul 28, 2022

SUMMARY

Some of the older private channels in the workspace I'm working in have channel ID's starting with G0 and GF and this resulted to false positive channel_not_found errors.
I've added these prefixes to the list to maintain as much backwards compatibility as possible.

Ideally the auto-prefix of the channel name with # is dropped entirely, given the Channel ID's have become more dominant in the Slack API over the past years.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

Slack notification module

ADDITIONAL INFORMATION

This ansible task will trigger the "channel_not_found" error, because this module erroneously prefixes the channel id with #:

- name: Send a message to slack
  community.general.slack:
    token: "{{ slack_token }}"
    channel: GF123456
    msg: my-message

Some of the older private channels in the workspace I'm working in have channel ID's starting with `G0` and `GF` and this resulted to false positive `channel_not_found` errors.
I've added these prefixes to the list to maintain as much backwards compatibility as possible.

Ideally the auto-prefix of the channel name with `#` is dropped entirely, given the Channel ID's have become more dominant in the Slack API over the past years.
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor notification plugins plugin (any type) small_patch Hopefully easy to review labels Jul 28, 2022
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! Could you please add a changelog fragment? Thanks.

@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-4 labels Jul 28, 2022
@rtuin
Copy link
Contributor Author

rtuin commented Jul 28, 2022

@felixfontein done!

@ansibullbot ansibullbot removed the small_patch Hopefully easy to review label Jul 28, 2022
Co-authored-by: Felix Fontein <felix@fontein.de>
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Looks good to me, though haven't tested it (I'm no slack user). If nobody complains, I'll merge this for the next release.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Jul 31, 2022
@felixfontein felixfontein merged commit 3fe9592 into ansible-collections:main Jul 31, 2022
@patchback
Copy link

patchback bot commented Jul 31, 2022

Backport to stable-4: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-4/3fe9592cf1505a78b243ed4552aba06423ee948b/pr-5019

Backported as #5043

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jul 31, 2022
* Slack: Add support for (some) groups

Some of the older private channels in the workspace I'm working in have channel ID's starting with `G0` and `GF` and this resulted to false positive `channel_not_found` errors.
I've added these prefixes to the list to maintain as much backwards compatibility as possible.

Ideally the auto-prefix of the channel name with `#` is dropped entirely, given the Channel ID's have become more dominant in the Slack API over the past years.

* Add changelog fragment for slack channel prefix fix

* Update changelogs/fragments/5019-slack-support-more-groups.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3fe9592)
@patchback
Copy link

patchback bot commented Jul 31, 2022

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/3fe9592cf1505a78b243ed4552aba06423ee948b/pr-5019

Backported as #5044

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jul 31, 2022
* Slack: Add support for (some) groups

Some of the older private channels in the workspace I'm working in have channel ID's starting with `G0` and `GF` and this resulted to false positive `channel_not_found` errors.
I've added these prefixes to the list to maintain as much backwards compatibility as possible.

Ideally the auto-prefix of the channel name with `#` is dropped entirely, given the Channel ID's have become more dominant in the Slack API over the past years.

* Add changelog fragment for slack channel prefix fix

* Update changelogs/fragments/5019-slack-support-more-groups.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3fe9592)
@github-actions
Copy link

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

felixfontein pushed a commit that referenced this pull request Jul 31, 2022
* Slack: Add support for (some) groups

Some of the older private channels in the workspace I'm working in have channel ID's starting with `G0` and `GF` and this resulted to false positive `channel_not_found` errors.
I've added these prefixes to the list to maintain as much backwards compatibility as possible.

Ideally the auto-prefix of the channel name with `#` is dropped entirely, given the Channel ID's have become more dominant in the Slack API over the past years.

* Add changelog fragment for slack channel prefix fix

* Update changelogs/fragments/5019-slack-support-more-groups.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3fe9592)

Co-authored-by: Richard Tuin <richardtuin@gmail.com>
felixfontein pushed a commit that referenced this pull request Jul 31, 2022
* Slack: Add support for (some) groups

Some of the older private channels in the workspace I'm working in have channel ID's starting with `G0` and `GF` and this resulted to false positive `channel_not_found` errors.
I've added these prefixes to the list to maintain as much backwards compatibility as possible.

Ideally the auto-prefix of the channel name with `#` is dropped entirely, given the Channel ID's have become more dominant in the Slack API over the past years.

* Add changelog fragment for slack channel prefix fix

* Update changelogs/fragments/5019-slack-support-more-groups.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 3fe9592)

Co-authored-by: Richard Tuin <richardtuin@gmail.com>
@rtuin rtuin deleted the patch-1 branch August 1, 2022 06:40
This was referenced Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module new_contributor Help guide this first time contributor notification plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants