Comments (4)
I agree that it would be preferable to be able to use the icon and username defined in the Slack integration, rather than always overriding it.
But it's not enough to fix this in initialize
. If the username isn't set to a sane default then it will be nil, and the resultant JSON sent to Slack will look like this.
{
"username": null,
"etc": "etc"
}
So the request_body
def needs to be patched too, because that's where the JSON request gets built. If config[:username] is nil, it shouldn't be included in the request at all.
from chef-slack_handler.
Just working on a pull request for this.
from chef-slack_handler.
This actually works with null username by the way, Slack still uses the default set on its side if null is submitted. Will patch it anyway.
from chef-slack_handler.
Fixed in #19.
from chef-slack_handler.
Related Issues (20)
- webhook triggered on success with fail_only=true HOT 2
- icon_url config not read in slack_handler_webhook.rb
- Add support for cookbook context HOT 2
- default['chef_client']['handler']['slack']['fail_only'] is ignored when using webhooks HOT 5
- Add support for deployment start message HOT 7
- `channel` listed as optional but slackr requires it HOT 2
- Add support for environment HOT 5
- At latest version problems when changing message_detail_level from basic to other HOT 4
- undefined method `run_context' for Chef:Class HOT 10
- why-run mode not working when using this cookbook HOT 1
- Integrating Slack Handler into client.rb? HOT 5
- no implicit conversion of Chef::DelayedEvaluator into String HOT 6
- WARN: Failed to send message to Slack: undefined local variable or method `run_context' for #<SlackHandlerUtil:0x00000001d8e1d0> HOT 11
- better handling of webhook messages with encoding problems
- Initial run fails due to missing /var/chef/handlers directory HOT 1
- NameError: uninitialized constant Chef::Handler::Slack HOT 1
- chef_handler 3.0 breaks it HOT 2
- Handler does not alert on custom exceptions HOT 3
- Ridley error when uploading cookbook
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chef-slack_handler.