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

NoMethodError traceback on slack_poster.rb:32:in `send_request' #300

Open
hslabbert opened this issue Apr 5, 2019 · 0 comments
Open

NoMethodError traceback on slack_poster.rb:32:in `send_request' #300

hslabbert opened this issue Apr 5, 2019 · 0 comments

Comments

@hslabbert
Copy link

Hiya,

I built a docker image per the instructions, from current master (108b95f).

I'm getting an exception on trying to post to Slack:

/usr/src/app # bundle exec bin/seal.rb 
{"icon_emoji":":angrier_seal:","username":"Angry Seal","channel":
<stripped>
\n\nRemember each time you forget to review your pull requests, a baby seal dies.\n    \n\n"}
bundler: failed to load command: bin/seal.rb (bin/seal.rb)
NoMethodError: undefined method `success?' for "ok (200)":String
Did you mean?  succ!
  /usr/src/app/lib/slack_poster.rb:32:in `send_request'
  /usr/src/app/lib/seal.rb:40:in `bark_at'
  /usr/src/app/lib/seal.rb:20:in `block in bark'
  /usr/src/app/lib/seal.rb:20:in `each'
  /usr/src/app/lib/seal.rb:20:in `bark'
  bin/seal.rb:5:in `<top (required)>'

This is for querying from a GH Enterprise setup, but I can confirm that I do get open PRs properly in the body. Editing https://github.com/binaryberry/seal/blob/master/lib/slack_poster.rb#L32 as follows gets things working:

        raise SlackResponseError, "Posting to webhook failed with: #{response.status} #{response.reason_phrase} #{response.body}" unless response.include?("200")

So it appears to be and issue in trying to handle a string response as a response type object?

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

1 participant