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

Channel error #12

Open
asyba opened this issue Nov 7, 2019 · 1 comment
Open

Channel error #12

asyba opened this issue Nov 7, 2019 · 1 comment

Comments

@asyba
Copy link

asyba commented Nov 7, 2019

The SLACK_CHANNEL I put is a private channel in slack.

'channels': KeyError
Traceback (most recent call last):
  File "/var/task/notifier.py", line 98, in run
    m = process(event)
  File "/var/task/notifier.py", line 91, in process
    processCodePipeline(event)
  File "/var/task/notifier.py", line 56, in processCodePipeline
    existing_msg = find_message_for_build(buildInfo)
  File "/var/task/slack_helper.py", line 40, in find_message_for_build
    for m in find_my_messages("builds"):
  File "/var/task/slack_helper.py", line 28, in find_my_messages
    ch_id = find_channel(ch_name)
  File "/var/task/slack_helper.py", line 17, in find_channel
    for ch in r['channels']:
KeyError: 'channels'

image

image

@Leo137
Copy link

Leo137 commented Jan 23, 2020

I had success changing
"/var/task/slack_helper.py", line 40
find_my_messages("builds")
to
find_my_messages(SLACK_CHANNEL)

And setted my Slack App Scopes to:

channels:history
channels:read
chat:write

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

No branches or pull requests

2 participants